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

[Bug]: Cannot find name 'FORM_DEFAULTS_FIELD' in index.d.ts #227

Closed
1 of 4 tasks
haines opened this issue Jan 3, 2023 · 2 comments · Fixed by #281
Closed
1 of 4 tasks

[Bug]: Cannot find name 'FORM_DEFAULTS_FIELD' in index.d.ts #227

haines opened this issue Jan 3, 2023 · 2 comments · Fixed by #281
Labels
bug Something isn't working

Comments

@haines
Copy link
Contributor

haines commented Jan 3, 2023

Which packages are impacted?

  • remix-validated-form
  • @remix-validated-form/with-zod
  • @remix-validated-form/with-yup
  • zod-form-data

What version of these packages are you using?

  • remix-validated-form: 4.6.7

Please provide a link to a minimal reproduction of the issue.

https://github.com/haines/remix-validated-form-ts-error

Steps to Reproduce the Bug or Issue

  1. Add remix-validated-form to a Remix app
  2. Run npm run typecheck
  3. See an error
node_modules/remix-validated-form/dist/index.d.ts:165:33 - error TS2304: Cannot find name 'FORM_DEFAULTS_FIELD'.

165     [formDefaultsKey: `${typeof FORM_DEFAULTS_FIELD}_${string}`]: any;

Expected behavior

Type-checking succeeds

Screenshots or Videos

No response

Platform

N/A

Additional context

This appears to have been introduced in #222

@airjp73
Copy link
Owner

airjp73 commented Jan 5, 2023

I was able to trace this issue back to tsup and opened an issue here. If we don't get a response, we can fix it by exporting the type.

Fortunately, I don't think this type is very critical. You should be able to set "skipLibCheck": true in your tsconfig and go about your day :).

@haines
Copy link
Contributor Author

haines commented Jan 5, 2023

Nice find, thanks for investigating!

airjp73 added a commit that referenced this issue Jun 6, 2023
Export FORM_DEFAULTS_FIELD to fix #227
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants