Skip to content

Commit 4fa2e5e

Browse files
author
Andy
authored
Merge pull request microsoft#11540 from Microsoft/jsdoc_type_alias
Support JSDoc for type alias
2 parents 3b0515f + 413a26b commit 4fa2e5e

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/compiler/parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5352,7 +5352,7 @@ namespace ts {
53525352
parseExpected(SyntaxKind.EqualsToken);
53535353
node.type = parseType();
53545354
parseSemicolon();
5355-
return finishNode(node);
5355+
return addJSDocComment(finishNode(node));
53565356
}
53575357

53585358
// In an ambient declaration, the grammar only allows integer literals as initializers.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
///<reference path="fourslash.ts" />
2+
3+
/////** DOC */
4+
////type /**/T = number
5+
6+
goTo.marker();
7+
verify.quickInfoIs("type T = number", "DOC ");

0 commit comments

Comments
 (0)