Skip to content

fix(types): deny unknown attributes by default

Created by: blake-newman

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 :face_exhaling:

Merge request reports