-
Notifications
You must be signed in to change notification settings - Fork 718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maximum call stack size exceeded
error starting from 0.25.3
#2451
Comments
Maximum call stack size exceeded
error with 0.25.4Maximum call stack size exceeded
error starting from 0.25.3
OK, I narrowed it down to this reproductible test case: type Foo =
| FooA
| FooB
;
interface BaseFoo<T extends string> {
type: T;
is<Type extends string>(type: Type): this is Foo & {
type: Type;
};
}
interface FooA extends BaseFoo<"A"> {
}
interface FooB extends BaseFoo<"B"> {
} Using typedoc on this code will trigger the |
Wow, that's a weird one. That was a pretty small release in terms of changes.. Probably related to the mixin handling improvements introduced there. |
The Typescript syntax that trigger the issue is quite unusual too - but valid - so it is understandable that it was never tested. Probably something to do with the indirect circular reference, what do you think? |
Possibly, but the call stack in your logs tells me that somewhere typedoc is creating reflections with recursive parents, which should probably be like a 1 line fix. It's probably some copy paste mistake |
Ick. This is caused by the horribly hacky fix I put in for #2011... According to TS, Feels like the compiler API ought to be admitting that this is an intersection though, I've asked in the compiler API section in Discord, hopefully one of the compiler devs will tell me I'm being dumb... |
Well, not completely dumb, but I'm surprised I hadn't realized before that if a type contains a union, the union must be present at the top level of the type, so TS is normalizing that type internally to be The fix for this is to use the internal |
Amazing. Thanks a lot. |
Search terms
Maximum call stack size exceeded
Expected Behavior
With 0.25.2 building the documentation of Twing was working perfectly. I expect that a patch release doesn't break something that was working.
Actual Behavior
Starting with 0.25.3 building the documentation of Twing fails with the error:
Maximum call stack size exceeded
Steps to reproduce the bug
I'm investigating the code of typedoc itself and the changes that were made between 0.25.2 and 0.25.3 and will update this issue as soon as I find the culprit.
In the meantime, here is the job log of Twing:
https://gitlab.com/nightlycommit/twing/-/jobs/5671446717
Environment
The text was updated successfully, but these errors were encountered: