extract error when code has msg
type Annotation in TS
#1916
Answered
by
timofei-iatsenko
ninesunsabiu
asked this question in
Q&A
-
the code: import { msg } from "@lingui/macro"
import { useLingui } from "@lingui/react";
const title = msg`hi`
type Props = {
onChange?: (msg: string) => void
}
export const Title = (props: Props) => {
const { _ } = useLingui()
return <h1>{_(title)}</h1>
} and when I change to: type Props = {
- onChange?: (msg: string) => void
+ onChange?: (msgs: string) => void
} it works. To Reproduce repro: https://github.com/ninesunsabiu/lingui-brace-bug/blob/main/src/Title.tsx |
Beta Was this translation helpful? Give feedback.
Answered by
timofei-iatsenko
Apr 18, 2024
Replies: 1 comment 2 replies
-
Dug into the issue, and it seems it's a bug in babel-macro-plugin. It's already fixed in |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#1867