openapi-typescript-codegen icon indicating copy to clipboard operation
openapi-typescript-codegen copied to clipboard

CancelablePromise error - Typescript (intermediate value)(intermediate value)(intermediate value) is not a function

Open DreadfulBot opened this issue 1 year ago • 1 comments

Describe the bug Environment: Project for next-js with "typescript": "^4.9.4", template for client axios

When I'm trying to call any request, I receive error on line 54 of CancelablePromise.ts file:

Screenshot 2023-11-25 at 16 02 22

The error is:

(intermediate value)(intermediate value)(intermediate value) is not a function

Screenshot 2023-11-25 at 15 57 19

The fun fact: If I change code to non-null calling like that:

Screenshot 2023-11-25 at 15 58 31

The error is disappearing.

Also, I've noticed that in current repository/master branch code of this place is changed to another type of null-checking:

Screenshot 2023-11-25 at 16 00 09

, but in last released version it is still as in my problem

DreadfulBot avatar Nov 25 '23 19:11 DreadfulBot

Looks like dup of https://github.com/ferdikoomen/openapi-typescript-codegen/pull/1627

DreadfulBot avatar Nov 25 '23 19:11 DreadfulBot