Description
TypeScript Version: 3.5.1
Search Terms: JSDoc backticks tsserver crash no intellisense
Code
/**
* @param `arg` str: string argument that will be shown in message
*/
function hello(arg: string) {
console.log(arg);
}
hello('World');
Expected behavior:
This compiles fine with tsc
. When loaded into VSCode however tsserver crashes without any meaningful error message.
Actual behavior:
tsserver should not crash. An error would be fine if this is invalid JSDoc (I don't actually know JSDoc).
Playground Link:
Since this only happens in tsserver I have no playground link
Related Issues:
I believe this may be related to this change: c3a9429
The issue is not present in 3.4
The function parseBracketNameInPropertyAndParamTag
calls parseExpectedTokenJSDoc(SyntaxKind.BacktickToken);
and parseExpectedTokenJSDoc
then calls ts.tokenToString(t)
on SyntaxKind.BacktickToken
and this returns undefined
. This undefined
then blows up in an assert later on.