Microsoft/TypeScript
View on GitHub[5.5 regression] "Maximum call stack size exceeded" when serializing nested self-referencing class expressions
Open
#59,600 opened on Aug 12, 2024
BugDomain: Declaration EmitHelp Wanted
Repository metrics
- Stars
- (48,455 stars)
- PR merge metrics
- (Avg merge 6d 17h) (9 merged PRs in 30d)
Description
🔎 Search Terms
dts declaration serializing class expression self-referencing nested
🕗 Version & Regression Information
- This changed between versions 5.4.x and 5.5.x
⏯ Playground Link
💻 Code
const A = class A<T> {
child!: InstanceType<typeof A.B<T>>;
static B = class B<T> {
parent!: T;
};
};
🙁 Actual behavior
it crashes
🙂 Expected behavior
it shouldn't crash 😉
Additional information about the issue
No response