Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

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

Closed
blake-newman wants to merge 1 commit into vuejs:main from Attest:blake.newman/deny-unknown-attributes-by-default
Closed

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

blake-newman wants to merge 1 commit into vuejs:main from Attest:blake.newman/deny-unknown-attributes-by-default

Conversation

@blake-newman
Copy link
Member

@blake-newman blake-newman commented Sep 20, 2022

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 😮‍💨

@blake-newman blake-newman changed the base branch from dev to main September 20, 2022 10:09
@blake-newman blake-newman changed the title (削除) Blake.newman/deny unknown attributes by default (削除ここまで) (追記) fix(types): deny unknown attributes by default (追記ここまで) Sep 20, 2022
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /