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 several type and build errors and fix example type inference #399

Merged
merged 3 commits into from
Jun 13, 2023

Conversation

flybayer
Copy link
Contributor

@flybayer flybayer commented Jun 13, 2023

  • Fix type of ChangeProps.onChange
  • Fix basic react example <form.Subscribe> to get type inference working
  • Fix build error by removing unused validateForm() method
  • Fix the build by adding a few as any on react-store errors that I don't understand
  • Fix the below pnpm test:build error by adding ['@babel/plugin-proposal-class-properties', { loose: false }] to the babel config
[!] Error: Private field '#prevState' must be declared in an enclosing class (Note that you need plugins to import files that are not JavaScript)
packages/form-core/src/FieldApi.ts (116:35)
114:             : undefined
115: 
116:           if (state.value !== this.#prevState.value) {
                                        ^
117:             this.validate('change', state.value)
118:           }
Error: Private field '#prevState' must be declared in an enclosing class (Note that you need plugins to import files that are not JavaScript)
    at error (/home/runner/work/form/form/node_modules/.pnpm/rollup@2.[78](https://github.com/TanStack/form/actions/runs/5260366012/jobs/9507176611?pr=399#step:6:79).1/node_modules/rollup/dist/shared/rollup.js:198:30)
    at Module.error (/home/runner/work/form/form/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/shared/rollup.js:12560:16)
    at Module.tryParse (/home/runner/work/form/form/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/shared/rollup.js:12937:25)
    at Module.setSource (/home/runner/work/form/form/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/shared/rollup.js:12[84](https://github.com/TanStack/form/actions/runs/5260366012/jobs/9507176611?pr=399#step:6:85)2:24)
    at ModuleLoader.addModuleSource (/home/runner/work/form/form/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/shared/rollup.js:22284:20)

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@flybayer flybayer changed the title fix few type errors and fix example fix several type and build errors and fix example type inference Jun 13, 2023
@tannerlinsley tannerlinsley merged commit a3f9709 into TanStack:main Jun 13, 2023
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.

2 participants