Closed
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