mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 11:24:29 -05:00
Fix metadata serialization for invalid jsdoc types (#37836)
This commit is contained in:
@@ -1590,6 +1590,18 @@ namespace ts {
|
||||
case SyntaxKind.ImportType:
|
||||
break;
|
||||
|
||||
// handle JSDoc types from an invalid parse
|
||||
case SyntaxKind.JSDocAllType:
|
||||
case SyntaxKind.JSDocUnknownType:
|
||||
case SyntaxKind.JSDocFunctionType:
|
||||
case SyntaxKind.JSDocVariadicType:
|
||||
case SyntaxKind.JSDocNamepathType:
|
||||
break;
|
||||
|
||||
case SyntaxKind.JSDocNullableType:
|
||||
case SyntaxKind.JSDocNonNullableType:
|
||||
case SyntaxKind.JSDocOptionalType:
|
||||
return serializeTypeNode((<JSDocNullableType | JSDocNonNullableType | JSDocOptionalType>node).type);
|
||||
|
||||
default:
|
||||
return Debug.failBadSyntaxKind(node);
|
||||
|
||||
Reference in New Issue
Block a user