You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior: Compilation to show an error. (I accidentally used a JSDoc type, jumping between too many different languages at once...)
Actual behavior: TypeScript crashed, from the CLI it crashed even before any diagnostics were printed:
/var/home/ryan/code/bkglass/proxissh/node_modules/typescript/lib/tsc.js:81040
throw e;
^
Error: Debug Failure. Unexpected node.
Node 297 was unexpected.
at serializeTypeNode (/var/home/ryan/code/bkglass/proxissh/node_modules/typescript/lib/tsc.js:64374:37)
at serializeTypeOfNode (/var/home/ryan/code/bkglass/proxissh/node_modules/typescript/lib/tsc.js:64249:28)
at addOldTypeMetadata (/var/home/ryan/code/bkglass/proxissh/node_modules/typescript/lib/tsc.js:64191:92)
at addTypeMetadata (/var/home/ryan/code/bkglass/proxissh/node_modules/typescript/lib/tsc.js:64185:17)
at transformAllDecoratorsOfDeclaration (/var/home/ryan/code/bkglass/proxissh/node_modules/typescript/lib/tsc.js:64104:13)
at generateClassElementDecorationExpression (/var/home/ryan/code/bkglass/proxissh/node_modules/typescript/lib/tsc.js:64129:40)
at generateClassElementDecorationExpressions (/var/home/ryan/code/bkglass/proxissh/node_modules/typescript/lib/tsc.js:64115:34)
at addClassElementDecorationStatements (/var/home/ryan/code/bkglass/proxissh/node_modules/typescript/lib/tsc.js:64108:44)
at visitClassDeclaration (/var/home/ryan/code/bkglass/proxissh/node_modules/typescript/lib/tsc.js:63906:13)
at visitTypeScript (/var/home/ryan/code/bkglass/proxissh/node_modules/typescript/lib/tsc.js:63795:28)
error Command failed with exit code 1.
From the playground, the error is a bit different and a diagnostic is shown first:
Uncaught (in promise) Error: Debug Failure. Unexpected node.
Node JSDocNullableType was unexpected.
at ae (tsWorker.js:21)
at ne (tsWorker.js:21)
at tsWorker.js:21
at tsWorker.js:21
at q (tsWorker.js:21)
at X (tsWorker.js:21)
at tsWorker.js:21
at J (tsWorker.js:21)
at tsWorker.js:21
at F (tsWorker.js:21)
Uh oh!
There was an error while loading. Please reload this page.
TypeScript Version: Nightly, 3.8.3
Search Terms: jsdoc, "unexpected node"
Expected behavior: Compilation to show an error. (I accidentally used a JSDoc type, jumping between too many different languages at once...)
Actual behavior: TypeScript crashed, from the CLI it crashed even before any diagnostics were printed:
From the playground, the error is a bit different and a diagnostic is shown first:
Related Issues: #27999 seems similar
Code
Note that this requires
emitDecoratorMetadata: true
andexperimentalDecorators: true
.Output
Compiler Options
Playground Link: Provided
EDIT: Please ignore the title rename, I hit Enter too soon by accident...
The text was updated successfully, but these errors were encountered: