Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Class constructor BaseAPI cannot be invoked without 'new' #35539

Closed
andreafalco1991 opened this issue Dec 6, 2019 · 2 comments
Closed
Labels
Unactionable There isn't something we can do with this issue

Comments

@andreafalco1991
Copy link

Typescript: 3.6.3

After i have generate the api.ts with openApi Generator 4.2.2 i found the error "TypeError: Class constructor BaseAPI cannot be invoked without 'new'".
After some hours of debug i found the probable problem.
There is a function called like "xxxPublicxxx".
If i remove "Public" from the function name it seems to work correctly.

One more info:
the function belong to a class defined like "export class Aaa extends BaseAPI {"
and doesn't have the constructor because the constructor is inside BaseAPI.

@RyanCavanaugh RyanCavanaugh added the Unactionable There isn't something we can do with this issue label Dec 9, 2019
@RyanCavanaugh
Copy link
Member

To expedite the triage process, we need everyone to follow the issue template and instructions.

When you clicked "Create New Issue", the issue form was pre-populated with a template and some instructions. We need you to read those instructions completely, follow them, and then fill in all the fields in that template.

We are not able to assist with issues that don't follow the template instructions as they represent a significantly larger amount of work compared to issues which are correctly specified. Thank you for understanding.

@benmccann
Copy link
Contributor

I hit this as well. I had "target": "esnext" in my tsconfig.json. If I removed that then it worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Unactionable There isn't something we can do with this issue
Projects
None yet
Development

No branches or pull requests

3 participants