[TS][Fetch] Fix Typescript errors with 'strictNullChecks' mode enabled#4658
[TS][Fetch] Fix Typescript errors with 'strictNullChecks' mode enabled#4658wing328 merged 1 commit intoswagger-api:masterfrom megaboich:typescript-fetch-imrovements
Conversation
error TS2454: Variable 'contentTypeHeader' is used before being assigned. error TS2345: Argument of type 'FetchAPI | undefined' is not assignable to parameter of type 'FetchAPI'.
|
@megaboich thanks for the PR. Please run |
|
Dear wing328, It is my first time I do PR for this project, so I am trying my best. It did generate me whole new folder inside Should I commit this files to my forked repository or I just did something wrong. It kind of unsettling that files did not exist before. |
@megaboich I think you're doing a very good job.
No need. Let me update the Petstore sample for you and see how it goes. |
|
@megaboich the test results with the updated Petstore samples look good. I'll merge this later if no one has further feedback/question. cc @leonyu |
|
@megaboich thanks for your contribution, which has been merged into master. (we've added Swagger Codegen to ProductHunt: https://www.producthunt.com/posts/swagger-codegen, pleae upvote if you find Swagger Codegen useful) |
|
Well, thanks a lot! |
…pi#4658) error TS2454: Variable 'contentTypeHeader' is used before being assigned. error TS2345: Argument of type 'FetchAPI | undefined' is not assignable to parameter of type 'FetchAPI'.
|
Is this fix reverted on current master? |
error TS2454: Variable 'contentTypeHeader' is used before being assigned.
error TS2345: Argument of type 'FetchAPI | undefined' is not assignable to parameter of type 'FetchAPI'.
Description of the PR
According to issue #4657