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

(48,10): Class 'Component<ITemplateForm, any, any>' defines instance member function 'componentDidMount', but extended class 'TemplateForm' defines it as instance member property. #25676

Closed
kimown opened this issue Jul 16, 2018 · 4 comments
Labels
Question An issue which isn't directly actionable in code

Comments

@kimown
Copy link

kimown commented Jul 16, 2018

(48,10): Class 'Component<ITemplateForm, any, any>' defines instance member function 'componentDidMount', but extended class 'TemplateForm' defines it as instance member property.

I really don't understand the meaning of this error, TypeScript error message is useless mostly, I have to use SO, google and many others.

@kimown
Copy link
Author

kimown commented Jul 16, 2018

https://stackoverflow.com/questions/48870716/need-help-solving-a-react-typescript-error

I find solution, please mention it in error message, why let so many people waste their time.

@kitsonk
Copy link
Contributor

kitsonk commented Jul 16, 2018

TypeScript cannot mind read why the base class is defined the way it is, nor why, you as a developer attempted to extend it in an incorrect way. It can only explain that you did as such, which is what the error says.

What error would be more useful that could be applied generically to TypeScript irrespective of framework being used?

Why did you ignore the template for issues which indicated that there was a lot more information required to address an issue, and that this isn't a support forum? Clearly StackOverflow was the appropriate place for this question, and was already answered.

@DanielRosenwasser
Copy link
Member

DanielRosenwasser commented Jul 16, 2018

We might not even want to issue this error anymore: #17113.

@DanielRosenwasser DanielRosenwasser added the Question An issue which isn't directly actionable in code label Jul 16, 2018
@typescript-bot
Copy link
Collaborator

Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question An issue which isn't directly actionable in code
Projects
None yet
Development

No branches or pull requests

4 participants