File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -826,11 +826,11 @@ export class ApiModelGenerator {
826826 const propertyTypeTokenRange : IExcerptTokenRange = ExcerptBuilder . createEmptyTokenRange ( ) ;
827827
828828 // If the property declaration's type is `undefined`, then we're processing a setter with no corresponding
829- // getter. Use the parameter type instead (note that TSC will enforce that the setter has exactly one
830- // parameter).
831- const propertyTypeNode : ts . TypeNode =
829+ // getter. Use the parameter type instead (note that TypeScript always reports an error if a setter
830+ // does not have exactly one parameter).
831+ const propertyTypeNode : ts . TypeNode | undefined =
832832 ( astDeclaration . declaration as ts . PropertyDeclaration | ts . GetAccessorDeclaration ) . type ||
833- ( astDeclaration . declaration as ts . SetAccessorDeclaration ) . parameters [ 0 ] . type ! ;
833+ ( astDeclaration . declaration as ts . SetAccessorDeclaration ) . parameters [ 0 ] . type ;
834834 nodesToCapture . push ( { node : propertyTypeNode , tokenRange : propertyTypeTokenRange } ) ;
835835
836836 const excerptTokens : IExcerptToken [ ] = this . _buildExcerptTokens ( astDeclaration , nodesToCapture ) ;
You can’t perform that action at this time.
0 commit comments