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

Add fix for broken type hinting on class components #2962

Merged
merged 1 commit into from
Jul 14, 2021

Conversation

davwheat
Copy link
Member

Changes proposed in this pull request:
This PR fixes some issues with custom attribute hinting and type validation.

For more info, see: https://www.typescriptlang.org/docs/handbook/jsx.html#attribute-type-checking

In a nutshell, we need to add ElementAttributesProperty to tell Typescript what property on component classes to look at for attribute typings. For our Component class, this would be attrs (e.g. this.attrs...)

Reviewers should focus on:

Screenshot
image

@davwheat davwheat added this to the 1.0.5 milestone Jul 13, 2021
@davwheat davwheat self-assigned this Jul 13, 2021
@dsevillamartin
Copy link
Member

Interesting. This time, I think it had been working fine for me on PhpStorm, but I don't see a reason to not add this.

@davwheat davwheat merged commit 5a1948c into master Jul 14, 2021
@davwheat davwheat deleted the dw/fix-attr-typings branch July 14, 2021 14:13
@SychO9 SychO9 modified the milestones: 1.0.5, 1.1 Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants