Skip to content

fix(types): deny unknown attributes by default #12887

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

blake-newman
Copy link
Member

Deny unknown attributes by default; using type for ReservedProps gave a default index signature which allowed uknown attributes.

Import expectType in tsx type test as this was causing false error suppression.

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

Other information:
Screenshot from 2022-09-20 11-02-12

I'm unsure why [name: string]: string index type is being applied when using type but using interface fixes it 🤷. I can't get this to apply in TS playground 😮‍💨

Deny unknown attributes by default; using type for `ReservedProps`
gave a default index signature which allowed uknown attributes.

Import expectType in tsx type test as this was causing false error
suppression.
@blake-newman blake-newman force-pushed the blake.newman/deny-unknown-attributes-by-default branch from c75a636 to 09b717a Compare November 28, 2022 16:04
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.

1 participant