π Search Terms
infinite loop, hyphen, comment, JSDoc
π Version & Regression Information
- This changed between versions
5.4.5 and 5.5.2.
- This likely changed in commit
cd566bad95124aded20f4cd35e95810077500e40.
β― Playground Link
No response
π» Code
import ts from 'typescript';
ts.createSourceFile(
"t.ts",
"/**a-*/\nconst x = 1;",
ts.ScriptTarget.ESNext,
true,
);
π Actual behavior
createSourceFile never returns. The process spins until killed.
π Expected behavior
The parser should finish normally.
Additional information about the issue
I think this comes from the scanner used for comments that start with /**, even when the comment does not contain any JSDoc tags.
In editors that use the TypeScript language server, this can also leave the project stuck during initialization if one of the files contains this comment.
π Search Terms
infinite loop, hyphen, comment, JSDoc
π Version & Regression Information
5.4.5and5.5.2.cd566bad95124aded20f4cd35e95810077500e40.β― Playground Link
No response
π» Code
π Actual behavior
createSourceFilenever returns. The process spins until killed.π Expected behavior
The parser should finish normally.
Additional information about the issue
I think this comes from the scanner used for comments that start with
/**, even when the comment does not contain any JSDoc tags.In editors that use the TypeScript language server, this can also leave the project stuck during initialization if one of the files contains this comment.