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

fix(TS): no-index type to exclude [otherProp: string]: any; #1373

Merged
merged 1 commit into from
Mar 22, 2023

Conversation

stijnvanhulle
Copy link
Contributor

@stijnvanhulle stijnvanhulle commented Mar 21, 2023

Description

Final-form-api is using FormProps with [otherProp: string]: any;. If you then use Omit it will resolve in [otherProp: string]: any; and all other types will not be visible anymore.

Typescript playground

By using NoIndex we can exclude [otherProp: string]: any; and have all the types that we normally have in FormProps.

Related

Both of them are closed with some examples on how to fix it but it seems that the TypeScript team will not fix the Omit. 👎🏼

Checklist: (please see documentation page for more information)

  • Yarn build passes
  • Yarn lint passes
  • Yarn test passes
  • Test coverage for new code (if applicable)
  • Documentation update (if applicable)
  • Correct commit message
    • format fix|feat({scope}): {description}
    • i.e. fix(pf3): wizard correctly handles next button
    • fix will release a new _._.X version
    • feat will release a new _.X._ version (use when you introduce new features)
      • we want to avoid any breaking changes, please contact us, if there is no way how to avoid them
    • scope: package
    • if you update the documentation or tests, do not use this format
      • i.e. Fix button on documenation example page

@vercel
Copy link

vercel bot commented Mar 21, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
react-forms ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 21, 2023 at 7:29PM (UTC)

@DataDrivenFormsBot
Copy link

A new version (fix) will be released: v3.20.4 [DataDrivenFormsBot]

@codecov
Copy link

codecov bot commented Mar 21, 2023

Codecov Report

Merging #1373 (1a918e0) into master (7aa9bb8) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1373   +/-   ##
=======================================
  Coverage   95.09%   95.09%           
=======================================
  Files         210      210           
  Lines        3647     3647           
  Branches     1271     1271           
=======================================
  Hits         3468     3468           
  Misses        179      179           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@rvsia rvsia requested a review from Hyperkid123 March 21, 2023 20:55
@Hyperkid123 Hyperkid123 merged commit 7dedcb4 into data-driven-forms:master Mar 22, 2023
@rvsia
Copy link
Contributor

rvsia commented Mar 22, 2023

@rvsia rvsia added the released label Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants