Unable to parse intersection with `typeof` (rc5)
jeparlefrancais opened this issue · 1 comments
jeparlefrancais commented
I found this issue with full-moon rc5, where intersection types using typeof don't parse:
export type Expect = typeof({}) & string
Which comes up in jest for example: https://github.com/jsdotlua/jest-lua/blob/main/src/expect/src/types.lua#L406-L408
YetAnotherClown commented
It looks like the minimal repro provided is actually incorrect, it does parse. The issue appears in the Jest example, specifically having typeof()
on a newline.
A proper minimal repro would be:
type T =
typeof({})