mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-18 06:17:19 -05:00
Allow parsing TS-style generics in JSDoc
Fixes #6814
(cherry picked from commit 6e06bb39a1)
# Conflicts:
# tests/cases/fourslash/jsDocGenerics1.ts
This commit is contained in:
@@ -5765,16 +5765,22 @@ namespace ts {
|
||||
const result = <JSDocTypeReference>createNode(SyntaxKind.JSDocTypeReference);
|
||||
result.name = parseSimplePropertyName();
|
||||
|
||||
while (parseOptional(SyntaxKind.DotToken)) {
|
||||
if (token === SyntaxKind.LessThanToken) {
|
||||
result.typeArguments = parseTypeArguments();
|
||||
break;
|
||||
}
|
||||
else {
|
||||
result.name = parseQualifiedName(result.name);
|
||||
if (token === SyntaxKind.LessThanToken) {
|
||||
result.typeArguments = parseTypeArguments();
|
||||
}
|
||||
else {
|
||||
while (parseOptional(SyntaxKind.DotToken)) {
|
||||
if (token === SyntaxKind.LessThanToken) {
|
||||
result.typeArguments = parseTypeArguments();
|
||||
break;
|
||||
}
|
||||
else {
|
||||
result.name = parseQualifiedName(result.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return finishNode(result);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user