mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-10 18:04:18 -05:00
Support JSDoc for type alias
This commit is contained in:
@@ -5352,7 +5352,7 @@ namespace ts {
|
||||
parseExpected(SyntaxKind.EqualsToken);
|
||||
node.type = parseType();
|
||||
parseSemicolon();
|
||||
return finishNode(node);
|
||||
return addJSDocComment(finishNode(node));
|
||||
}
|
||||
|
||||
// In an ambient declaration, the grammar only allows integer literals as initializers.
|
||||
|
||||
7
tests/cases/fourslash/jsDocForTypeAlias.ts
Normal file
7
tests/cases/fourslash/jsDocForTypeAlias.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
///<reference path="fourslash.ts" />
|
||||
|
||||
/////** DOC */
|
||||
////type /**/T = number
|
||||
|
||||
goTo.marker();
|
||||
verify.quickInfoIs("type T = number", "DOC ");
|
||||
Reference in New Issue
Block a user