File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
src/Facility.CodeGen.JavaScript Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -434,7 +434,7 @@ class ExampleApiHttpClient implements IExampleApi {
434
434
if ( ! value ) {
435
435
return createResponseError ( status , result . json ) as IServiceResult < IGetWidgetResponse > ;
436
436
}
437
- let headerValue : string ;
437
+ let headerValue : string | null | undefined ;
438
438
headerValue = result . response . headers . get ( 'eTag' ) ;
439
439
if ( headerValue != null ) {
440
440
value . eTag = headerValue ;
Original file line number Diff line number Diff line change @@ -233,7 +233,7 @@ protected override CodeGenOutput GenerateOutputCore(ServiceInfo service)
233
233
234
234
if ( httpMethodInfo . ResponseHeaderFields . Count != 0 )
235
235
{
236
- code . WriteLine ( "let headerValue" + IfTypeScript ( ": string" ) + ";" ) ;
236
+ code . WriteLine ( "let headerValue" + IfTypeScript ( ": string | null | undefined " ) + ";" ) ;
237
237
foreach ( var httpHeaderField in httpMethodInfo . ResponseHeaderFields )
238
238
{
239
239
code . WriteLine ( $ "headerValue = result.response.headers.get('{ httpHeaderField . Name } ');") ;
You can’t perform that action at this time.
0 commit comments