Microsoft/TypeScript
GitHub ã§èŠãBad parsing behaviour for generic arrow type arguments in class heritage / JSX open element
Open
#47,410 opened on 2022幎1æ12æ¥
BugDomain: ParserHelp Wanted
Repository metrics
- Stars
- Â (48,455 stars)
- PR merge metrics
-  (å¹³åããŒãž 6d 17h) (30d ã§ 9 merged PRs)
説æ
Bug Report
ð Search Terms
shift left type arguments <<
ð Version & Regression Information
- This is a crash
- This changed between versions ______ and _______
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about ____ Generics _____
- I was unable to test this on prior versions because _______
⯠Playground Link
Playground link with relevant code
ð» Code
// No parse error.
(class extends f()< <T>(x: T) => T> {});
<Component< <T>(x: T) => T> />;
// Parse error.
(class extends f()<<T>(x: T) => T> {});
<Component<<T>(x: T) => T> />;
ð Actual behavior
Parsing error.
ð Expected behavior
No parse error. They are equivalent.
Additional Info
Found this issue when working on a similar fix to Babel (https://github.com/babel/babel/pull/14145). This issue is a follow-up to #23996. /cc @Kingwl since you have fixed that issue.