File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
- /// <reference path="utilities.ts"/>
1
+ /// <reference path="utilities.ts"/>
2
2
/// <reference path="parser.ts"/>
3
3
4
4
/* @internal */
@@ -2178,7 +2178,11 @@ namespace ts {
2178
2178
case SyntaxKind . JSDocRecordMember :
2179
2179
return bindPropertyWorker ( node as JSDocRecordMember ) ;
2180
2180
case SyntaxKind . JSDocPropertyTag :
2181
- return declareSymbolAndAddToSymbolTable ( node as JSDocPropertyTag , SymbolFlags . Property , SymbolFlags . PropertyExcludes ) ;
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 ) ;
2182
2186
case SyntaxKind . JSDocFunctionType :
2183
2187
return bindFunctionOrConstructorType ( < SignatureDeclaration > node ) ;
2184
2188
case SyntaxKind . JSDocTypeLiteral :
You can’t perform that action at this time.
0 commit comments