mirror of
https://github.com/LukeHagar/form.git
synced 2025-12-06 12:27:45 +00:00
fix: Field components should now infer state.value properly
* chore: refactor TS typings for React * fix: field should now infer state.value properly in React adapter * chore: fix Vue package typings * chore: fix linting * chore: fix React adapter * chore: improve performance of TData type in FieldApi * chore: add back index and parent type * chore: add Vue TSC dep on Vue example * chore: fix lint and type test * chore: update Vite stuff * chore: add implicit dep for Vue and React examples * chore: add type test pre-req * chore: install deps from examples in PR CI * chore: remove filter from more installation
This commit is contained in:
@@ -5,17 +5,31 @@
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"build:dev": "vite build -m development",
|
||||
"test:types": "vue-tsc --noEmit",
|
||||
"serve": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tanstack/vue-form": "0.3.2",
|
||||
"vue": "^3.3.4",
|
||||
"@tanstack/form-core": "0.3.2",
|
||||
"@tanstack/react-form": "0.3.2"
|
||||
"@tanstack/vue-form": "0.3.2",
|
||||
"vue": "^3.3.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^4.2.3",
|
||||
"@vitejs/plugin-vue": "^4.3.4",
|
||||
"typescript": "^5.0.4",
|
||||
"vite": "^4.4.4"
|
||||
"vite": "^4.4.9",
|
||||
"vue-tsc": "^1.8.10"
|
||||
},
|
||||
"nx": {
|
||||
"implicitDependencies": [
|
||||
"@tanstack/form-core",
|
||||
"@tanstack/vue-form"
|
||||
],
|
||||
"targets": {
|
||||
"test:types": {
|
||||
"dependsOn": [
|
||||
"build"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ const form = useForm({
|
||||
|
||||
form.provideFormContext()
|
||||
|
||||
async function onChangeFirstName(value) {
|
||||
async function onChangeFirstName(value: string) {
|
||||
await new Promise((resolve) => setTimeout(resolve, 1000))
|
||||
return value.includes(`error`) && `No 'error' allowed in first name`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user