File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -2178,11 +2178,10 @@ namespace ts {
2178
2178
case SyntaxKind . JSDocRecordMember :
2179
2179
return bindPropertyWorker ( node as JSDocRecordMember ) ;
2180
2180
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 ) ;
2186
2185
case SyntaxKind . JSDocFunctionType :
2187
2186
return bindFunctionOrConstructorType ( < SignatureDeclaration > node ) ;
2188
2187
case SyntaxKind . JSDocTypeLiteral :
You can’t perform that action at this time.
0 commit comments