-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issue
Milestone
Description
TypeScript Version: 3.7.5
Search Terms: crash jsdoc tag template typedef
Code
crashit.js:
// @ts-check
/**
* @template TIterEntry
* @callback IterablePredicate
**/
/** @type {IterablePredicate<number>} */
let x
x(3)
x("a")tsc --allowJs --noEmit crashit.js
Expected behavior:
no crash
Actual behavior:
RangeError: Maximum call stack size exceeded
at getJSDocTags (/usr/local/lib/node_modules/typescript/lib/tsc.js:11614:26)
at getFirstJSDocTag (/usr/local/lib/node_modules/typescript/lib/tsc.js:11625:24)
at Object.getJSDocTypeTag (/usr/local/lib/node_modules/typescript/lib/tsc.js:11581:19)
at getSignatureOfTypeTag (/usr/local/lib/node_modules/typescript/lib/tsc.js:34795:52)
at getTypePredicateOfSignature (/usr/local/lib/node_modules/typescript/lib/tsc.js:34877:46)
at getTypePredicateOfSignature (/usr/local/lib/node_modules/typescript/lib/tsc.js:34867:47)
at getTypePredicateOfSignature (/usr/local/lib/node_modules/typescript/lib/tsc.js:34879:46)
at getTypePredicateOfSignature (/usr/local/lib/node_modules/typescript/lib/tsc.js:34867:47)
at getTypePredicateOfSignature (/usr/local/lib/node_modules/typescript/lib/tsc.js:34879:46)
at getTypePredicateOfSignature (/usr/local/lib/node_modules/typescript/lib/tsc.js:34867:47)
Playground Link: Playground Link
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issue