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
When using the allowJs option and requiring a js file, if in this js file there is a
JSDoc type annotation with a string (e.g. @param input {'opt1'|'opt2'}, the compiler fails with Unknown entity name kind.
Error: Debug Failure. False expression: Unknown entity name kind.
at Object.assert (/usr/local/lib/node_modules/typescript/lib/tsc.js:785:23)
at Object.fail (/usr/local/lib/node_modules/typescript/lib/tsc.js:790:19)
at resolveEntityName (/usr/local/lib/node_modules/typescript/lib/tsc.js:12515:26)
at resolveTypeReferenceName (/usr/local/lib/node_modules/typescript/lib/tsc.js:15214:20)
at getTypeFromTypeReference (/usr/local/lib/node_modules/typescript/lib/tsc.js:15238:30)
at getTypeFromTypeNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:15543:28)
at Object.map (/usr/local/lib/node_modules/typescript/lib/tsc.js:163:29)
at getTypeFromUnionTypeNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:15433:54)
at getTypeFromTypeNode (/usr/local/lib/node_modules/typescript/lib/tsc.js:15557:28)
at getTypeForVariableLikeDeclarationFromJSDocComment (/usr/local/lib/node_modules/typescript/lib/tsc.js:13689:24)
Expected
I'm not sure if strings in JSDocs are really valid. If they are, they should be recognized.
On the other hand, I guess that even if a given JSDoc comment is invalid, that should not block the compilation, but fallback to ignoring that JSDoc.
The text was updated successfully, but these errors were encountered:
When using the allowJs option and requiring a js file, if in this js file there is a
JSDoc type annotation with a string (e.g.
@param input {'opt1'|'opt2'}
, the compiler fails withUnknown entity name kind
.TypeScript Version: 1.8.0
Code
Checkout this repo: https://github.com/wkrueger/tsissue
or:
main.ts
jsinclude.js
Expected
I'm not sure if strings in JSDocs are really valid. If they are, they should be recognized.
On the other hand, I guess that even if a given JSDoc comment is invalid, that should not block the compilation, but fallback to ignoring that JSDoc.
The text was updated successfully, but these errors were encountered: