Skip to content

Commit 33eacda

Browse files
authored
docs: typedoc generation
* docs: initial work on implementing typedoc * docs: migrate to use formApi reference typedoc comments * chore: document FieldAPI from docs * chore: remove prefix to showcase file types * chore: migrate reference docs to take multiple paths * chore: add external and cleanup * chore: add lit and cleanup rm usage * chore: add manual docs to ts files themselves * chore: add React to reference docs * chore: add solid and vue code samples * chore: fix typedoc generations
1 parent a646dcd commit 33eacda

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+4151
-997
lines changed

docs/config.json

Lines changed: 57 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -160,85 +160,78 @@
160160
{
161161
"label": "API Reference",
162162
"children": [
163-
{
164-
"label": "FormApi",
165-
"to": "reference/formApi"
166-
},
167-
{
168-
"label": "FieldApi",
169-
"to": "reference/fieldApi"
170-
},
171-
{
172-
"label": "Types",
173-
"to": "reference/types"
174-
}
163+
{"label": "JavaScript Reference", "to": "reference/index"},
164+
{"label": "Classes / FieldApi", "to": "reference/fieldapi"},
165+
{"label": "Classes / FormApi", "to": "reference/formapi"},
166+
{"label": "Functions / formOptions", "to": "reference/formoptions"},
167+
{"label": "Functions / mergeForm", "to": "reference/mergeform"},
168+
{"label": "Interfaces / FieldApiOptions", "to": "reference/fieldapioptions"},
169+
{"label": "Interfaces / FieldOptions", "to": "reference/fieldoptions"},
170+
{"label": "Interfaces / FieldValidators", "to": "reference/fieldvalidators"},
171+
{"label": "Interfaces / FormOptions", "to": "reference/formoptions"},
172+
{"label": "Interfaces / FormValidators", "to": "reference/formvalidators"},
173+
{"label": "Types / DeepKeys", "to": "reference/deepkeys"},
174+
{"label": "Types / DeepValue", "to": "reference/deepvalue"},
175+
{"label": "Types / FieldInfo", "to": "reference/fieldinfo"},
176+
{"label": "Types / FieldMeta", "to": "reference/fieldmeta"},
177+
{"label": "Types / FieldState", "to": "reference/fieldstate"},
178+
{"label": "Types / FormState", "to": "reference/formstate"},
179+
{"label": "Types / Updater", "to": "reference/updater"},
180+
{"label": "Types / UpdaterFn", "to": "reference/updaterfn"},
181+
{"label": "Types / ValidationError", "to": "reference/validationerror"},
182+
{"label": "Types / ValidationMeta", "to": "reference/validationmeta"}
175183
],
176184
"frameworks": [
177185
{
178186
"label": "react",
179187
"children": [
180-
{
181-
"label": "useForm",
182-
"to": "framework/react/reference/useForm"
183-
},
184-
{
185-
"label": "useField",
186-
"to": "framework/react/reference/useField"
187-
},
188-
{
189-
"label": "Field",
190-
"to": "framework/react/reference/Field"
191-
},
192-
{
193-
"label": "FormApi",
194-
"to": "framework/react/reference/formApi"
195-
},
196-
{
197-
"label": "FieldApi",
198-
"to": "framework/react/reference/fieldApi"
199-
}
188+
{"label": "React Reference", "to": "framework/react/reference/index"},
189+
{"label": "Functions / createServerValidate", "to": "framework/react/reference/createservervalidate"},
190+
{"label": "Functions / Field", "to": "framework/react/reference/field"},
191+
{"label": "Functions / useField", "to": "framework/react/reference/usefield"},
192+
{"label": "Functions / useForm", "to": "framework/react/reference/useform"},
193+
{"label": "Functions / useTransform", "to": "framework/react/reference/usetransform"},
194+
{"label": "Types / FieldComponent", "to": "framework/react/reference/fieldcomponent"},
195+
{"label": "Types / UseField", "to": "framework/react/reference/usefield"},
196+
{"label": "Variables / initialFormState", "to": "framework/react/reference/initialformstate"}
200197
]
201198
},
202199
{
203200
"label": "vue",
204201
"children": [
205-
{
206-
"label": "useForm",
207-
"to": "framework/vue/reference/useForm"
208-
},
209-
{
210-
"label": "useField",
211-
"to": "framework/vue/reference/useField"
212-
},
213-
{
214-
"label": "Field",
215-
"to": "framework/vue/reference/Field"
216-
},
217-
{
218-
"label": "FormApi",
219-
"to": "framework/vue/reference/formApi"
220-
}
202+
{"label": "Vue Reference", "to": "framework/vue/reference/index"},
203+
{"label": "Functions / Field", "to": "framework/vue/reference/field"},
204+
{"label": "Functions / useField", "to": "framework/vue/reference/usefield"},
205+
{"label": "Functions / useForm", "to": "framework/vue/reference/useform"},
206+
{"label": "Types / FieldComponent", "to": "framework/vue/reference/fieldcomponent"},
207+
{"label": "Types / UseField", "to": "framework/vue/reference/usefield"}
221208
]
222209
},
223210
{
224211
"label": "solid",
225212
"children": [
226-
{
227-
"label": "useForm",
228-
"to": "framework/solid/reference/createForm"
229-
},
230-
{
231-
"label": "useField",
232-
"to": "framework/solid/reference/createField"
233-
},
234-
{
235-
"label": "Field",
236-
"to": "framework/solid/reference/Field"
237-
},
238-
{
239-
"label": "FormApi",
240-
"to": "framework/solid/reference/formApi"
241-
}
213+
{"label": "Solid Reference", "to": "framework/solid/reference/index"},
214+
{"label": "Functions / createField", "to": "framework/solid/reference/createfield"},
215+
{"label": "Functions / createForm", "to": "framework/solid/reference/createform"},
216+
{"label": "Functions / Field", "to": "framework/solid/reference/field"},
217+
{"label": "Types / CreateField", "to": "framework/solid/reference/createfield"},
218+
{"label": "Types / FieldComponent", "to": "framework/solid/reference/fieldcomponent"}
219+
]
220+
},
221+
{
222+
"label": "lit",
223+
"children": [
224+
{"label": "Lit Reference", "to": "framework/lit/reference/index"},
225+
{"label": "Classes / TanStackFormController", "to": "framework/lit/reference/tanstackformcontroller"}
226+
]
227+
},
228+
{
229+
"label": "angular",
230+
"children": [
231+
{"label": "Angular Reference", "to": "framework/angular/reference/index"},
232+
{"label": "Classes / TanStackField", "to": "framework/angular/reference/tanstackfield"},
233+
{"label": "Functions / injectForm", "to": "framework/angular/reference/injectform"},
234+
{"label": "Functions / injectStore", "to": "framework/angular/reference/injectstore"},
242235
]
243236
}
244237
]
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# @tanstack/angular-form
2+
3+
## Classes
4+
5+
- [TanStackField](tanstackfield.md)
6+
7+
## Functions
8+
9+
- [injectForm](injectform.md)
10+
- [injectStore](injectstore.md)
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Function: injectForm()
2+
3+
```ts
4+
function injectForm<TFormData, TFormValidator>(opts?): FormApi<TFormData, TFormValidator>
5+
```
6+
7+
## Type parameters
8+
9+
**TFormData**
10+
11+
**TFormValidator** *extends* `undefined` \| `Validator`\<`TFormData`, `unknown`\> = `undefined`
12+
13+
## Parameters
14+
15+
**opts?**: `FormOptions`\<`TFormData`, `TFormValidator`\>
16+
17+
## Returns
18+
19+
`FormApi`\<`TFormData`, `TFormValidator`\>
20+
21+
## Source
22+
23+
[inject-form.ts:4](https://github.com/TanStack/form/blob/5c94fa159313e0b0411d49fbdc3b117336185e63/packages/angular-form/src/inject-form.ts#L4)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Function: injectStore()
2+
3+
```ts
4+
function injectStore<TFormData, TFormValidator, TSelected>(form, selector?): Signal<TSelected>
5+
```
6+
7+
## Type parameters
8+
9+
**TFormData**
10+
11+
**TFormValidator** *extends* `undefined` \| `Validator`\<`TFormData`, `unknown`\> = `undefined`
12+
13+
**TSelected** = `NoInfer`\<`FormState`\<`TFormData`\>\>
14+
15+
## Parameters
16+
17+
**form**: `FormApi`\<`TFormData`, `TFormValidator`\>
18+
19+
**selector?**
20+
21+
## Returns
22+
23+
`Signal`\<`TSelected`\>
24+
25+
## Source
26+
27+
[inject-store.ts:4](https://github.com/TanStack/form/blob/5c94fa159313e0b0411d49fbdc3b117336185e63/packages/angular-form/src/inject-store.ts#L4)

0 commit comments

Comments
 (0)