-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptCrashFor flagging bugs which are compiler or service crashes or unclean exits, rather than bad outputFor flagging bugs which are compiler or service crashes or unclean exits, rather than bad output
Milestone
Description
Simplified from create-react-app/packages/react-dev-utils/typescriptFormatter.js:
Code
function formatter(message/**/) {
const { type } = false ? { type: message } : message;
}Request codefixes at /**/
Expected behavior:
No crash, plus some jsdoc type for message.
Actual behavior:
Crash:
TypeError: Cannot read property 'flags' of undefined
at Object.getCheckFlags (/home/nathansa/ts/built/local/tsserver.js:12910:23)
at getTypeOfSymbol (/home/nathansa/ts/built/local/tsserver.js:37460:20)
at getTypeOfNode (/home/nathansa/ts/built/local/tsserver.js:60574:24)
at Object.getTypeAtLocation (/home/nathansa/ts/built/local/tsserver.js:32271:31)
at inferTypeFromPropertyAssignment (/home/nathansa/ts/built/local/tsserver.js:117165:60)
at inferTypeFromContext (/home/nathansa/ts/built/local/tsserver.js:116983:25)
at inferTypeFromCallExpressionContext (/home/nathansa/ts/built/local/tsserver.js:117124:17)
at inferTypeFromContext (/home/nathansa/ts/built/local/tsserver.js:116969:29)
at inferTypeFromPropertyAccessExpressionContext (/home/nathansa/ts/built/local/tsserver.js:117138:17)
at inferTypeFromContext (/home/nathansa/ts/built/local/tsserver.js:116976:25)
at inferTypesFromReferences (/home/nathansa/ts/built/local/tsserver.js:116885:21)
at /home/nathansa/ts/built/local/tsserver.js:116922:40
at Array.map (<anonymous>)
at Object.inferTypeForParametersFromReferences (/home/nathansa/ts/built/local/tsserver.js:116902:47)
at annotateParameters (/home/nathansa/ts/built/local/tsserver.js:116709:58)
at doChange (/home/nathansa/ts/built/local/tsserver.js:116669:25)
at /home/nathansa/ts/built/local/tsserver.js:116570:109
at Function.ChangeTracker.with (/home/nathansa/ts/built/local/tsserver.js:114937:17)
at Object.getCodeActions (/home/nathansa/ts/built/local/tsserver.js:116570:64)
at /home/nathansa/ts/built/local/tsserver.js:115958:121
at Object.flatMap (/home/nathansa/ts/built/local/tsserver.js:567:25)
at Object.getFixes (/home/nathansa/ts/built/local/tsserver.js:115958:23)
at /home/nathansa/ts/built/local/tsserver.js:126009:35
at Object.flatMap (/home/nathansa/ts/built/local/tsserver.js:567:25)
at Object.getCodeFixesAtPosition (/home/nathansa/ts/built/local/tsserver.js:126007:23)
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptCrashFor flagging bugs which are compiler or service crashes or unclean exits, rather than bad outputFor flagging bugs which are compiler or service crashes or unclean exits, rather than bad output