File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- /// <reference path="utilities.ts"/>
1+ /// <reference path="utilities.ts"/>
22/// <reference path="parser.ts"/>
33
44/* @internal */
@@ -2178,7 +2178,11 @@ namespace ts {
21782178 case SyntaxKind . JSDocRecordMember :
21792179 return bindPropertyWorker ( node as JSDocRecordMember ) ;
21802180 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 ) ;
21822186 case SyntaxKind . JSDocFunctionType :
21832187 return bindFunctionOrConstructorType ( < SignatureDeclaration > node ) ;
21842188 case SyntaxKind . JSDocTypeLiteral :
You can’t perform that action at this time.
0 commit comments