Skip to content

Commit 5d585f6

Browse files
committed
Skip JSDoc in .ts files
Just an experiment for now. Current test failures: - all fourslash tests of jsdoc fail; the parser should produce jsdoc for tsserver. - Spurious unused-type errors because `@link` isn't parsed and treated as a usage. - ohhh no, `@this` is mistakenly interpreted in .ts files: thisInFunctionCall.
1 parent 737a931 commit 5d585f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1759,7 +1759,7 @@ namespace Parser {
17591759
}
17601760

17611761
function withJSDoc<T extends HasJSDoc>(node: T, hasJSDoc: boolean): T {
1762-
return hasJSDoc ? addJSDocComment(node) : node;
1762+
return hasJSDoc && (node.flags & NodeFlags.JavaScriptFile) ? addJSDocComment(node) : node;
17631763
}
17641764

17651765
let hasDeprecatedTag = false;

0 commit comments

Comments
 (0)