Open epmatsw opened 2 days ago
According to the provided bisect information it's caused by something in this diff.
To fix this a repro case has to be provided though.
It doesn't show up in the UI for some reason, but in the console you can see an uncaught promise rejection:
It shouldn't happen but I'm not entirely convinced that it's a repro case for your original problem. This crashes when calling reportNonexistentProperty
so it feels like an extra repro for https://github.com/microsoft/TypeScript/issues/60336 (that said... a new one cause your issue is pretty new and that can be reproduced with older TS versions). I assume that you've wanted to report an issue for a code that doesn't error on 5.6.3. Once we add a missing property, this repro stops crashing: TS playground
The above repro is caused by the fact that typeFromObjectLiteral
calls inferExpressionType
nowadays despite !canGetTypeFromObjectLiteral(objectLiteral, context)
. Previously it bailed out of this function and just returned false
in this case.
π Search Terms
"Maximum call stack size exceeded", "getContextualTypeForObjectLiteralElement", "checkNonNullExpression"
π Version & Regression Information
This changed between versions 5.7.0-dev.20240930 and 5.7.0-dev.20241001
I ran into this bug upgrading from 5.6.3 to 5.7.2 and bisected to that particular release.
β― Playground Link
https://www.typescriptlang.org/play/?ts=5.8.0-dev.20241122#code/KYDwDg9gTgLgBAYwgOwM7xgCwJbIOZwC8cA3gFACQAJhNjABQCUplFUwMArlMixfwG0s2VADoAhgF0AXHABEcgDSsAvgG5KK5eqA
π» Code
I don't have a narrowed code example, it just crashes when running
tsc --noEmit
on our whole project.π Actual behavior
π Expected behavior
No crash
Additional information about the issue
No response