File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2178,11 +2178,10 @@ namespace ts {
21782178 case SyntaxKind . JSDocRecordMember :
21792179 return bindPropertyWorker ( node as JSDocRecordMember ) ;
21802180 case SyntaxKind . JSDocPropertyTag :
2181- let optionalType = 0 ;
2182- if ( ( node as JSDocPropertyTag ) . typeExpression . type . kind === SyntaxKind . JSDocOptionalType ) {
2183- optionalType = SymbolFlags . Optional ;
2184- }
2185- return declareSymbolAndAddToSymbolTable ( node as JSDocPropertyTag , SymbolFlags . Property | optionalType , SymbolFlags . PropertyExcludes ) ;
2181+ return declareSymbolAndAddToSymbolTable ( node as JSDocPropertyTag ,
2182+ ( node as JSDocPropertyTag ) . typeExpression && ( node as JSDocPropertyTag ) . typeExpression . type . kind === SyntaxKind . JSDocOptionalType ?
2183+ SymbolFlags . Property | SymbolFlags . Optional : SymbolFlags . Property ,
2184+ SymbolFlags . PropertyExcludes ) ;
21862185 case SyntaxKind . JSDocFunctionType :
21872186 return bindFunctionOrConstructorType ( < SignatureDeclaration > node ) ;
21882187 case SyntaxKind . JSDocTypeLiteral :
You can’t perform that action at this time.
0 commit comments