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
Using TypeScript 1.8 beta with the "--allowJs" flag to compile a .js file with JSDoc comments causes a compiler crash for any file JS containing a JSDoc @return comment. For example:
/**
* @return the number 5
*/
function five() {
return 5;
}
% tsc --allowJs --outDir /tmp test.js
/home/bill/Applications/node-v4.2.4-linux-x64/lib/node_modules/typescript/lib/tsc.js:32796
throw e;
^
TypeError: Cannot read property 'type' of undefined
at getReturnTypeFromJSDocComment (/home/bill/Applications/node-v4.2.4-linux-x64/lib/node_modules/typescript/lib/tsc.js:19407:68)
at getSignatureFromDeclaration (/home/bill/Applications/node-v4.2.4-linux-x64/lib/node_modules/typescript/lib/tsc.js:14802:36)
at checkSpecializedSignatureDeclaration (/home/bill/Applications/node-v4.2.4-linux-x64/lib/node_modules/typescript/lib/tsc.js:20664:29)
at checkSignatureDeclaration (/home/bill/Applications/node-v4.2.4-linux-x64/lib/node_modules/typescript/lib/tsc.js:20420:13)
at checkFunctionOrMethodDeclaration (/home/bill/Applications/node-v4.2.4-linux-x64/lib/node_modules/typescript/lib/tsc.js:21170:13)
at checkFunctionDeclaration (/home/bill/Applications/node-v4.2.4-linux-x64/lib/node_modules/typescript/lib/tsc.js:21161:17)
at checkSourceElement (/home/bill/Applications/node-v4.2.4-linux-x64/lib/node_modules/typescript/lib/tsc.js:22800:28)
at Object.forEach (/home/bill/Applications/node-v4.2.4-linux-x64/lib/node_modules/typescript/lib/tsc.js:98:30)
at checkSourceFileWorker (/home/bill/Applications/node-v4.2.4-linux-x64/lib/node_modules/typescript/lib/tsc.js:22908:20)
at checkSourceFile (/home/bill/Applications/node-v4.2.4-linux-x64/lib/node_modules/typescript/lib/tsc.js:22894:13)
``
The text was updated successfully, but these errors were encountered:
Using TypeScript 1.8 beta with the "--allowJs" flag to compile a .js file with JSDoc comments causes a compiler crash for any file JS containing a JSDoc @return comment. For example:
% tsc --allowJs --outDir /tmp test.js
The text was updated successfully, but these errors were encountered: