mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 11:35:42 -06:00
Merge pull request #11540 from Microsoft/jsdoc_type_alias
Support JSDoc for type alias
This commit is contained in:
commit
4fa2e5ed8c
@ -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 ");
|
||||
Loading…
x
Reference in New Issue
Block a user