Variable: reactTanstackGenerator
const reactTanstackGenerator: GeneratorDriverBase<ObjectSchema<{
include: OptionalSchema<ArraySchema<StringSchema<undefined>, undefined>, undefined>;
relations: OptionalSchema<PicklistSchema<["flat", "deep"], undefined>, "flat">;
variants: OptionalSchema<SchemaWithPipe<readonly [ArraySchema<PicklistSchema<["full", "create", "update"], undefined>, undefined>, MinLengthAction<("full" | "create" | "update")[], 1, "variants must list at least one variant">]>, readonly ["full"]>;
zodVersion: OptionalSchema<PicklistSchema<[3, 4], undefined>, 4>;
}, undefined>> & {
dependsOn?: (options) => DependencyList<readonly [{
options: {
zodVersion: 3 | 4;
};
use: GeneratorDriverBase<ObjectSchema<{
dateType: ...;
zodVersion: ...;
}, undefined>> & {
dependsOn?: readonly [];
};
}]>;
};
Defined in: packages/gen-react-tanstack/src/generator.ts:51
Type Declaration
dependsOn?
optional dependsOn?: (options) => DependencyList<readonly [{
options: {
zodVersion: 3 | 4;
};
use: GeneratorDriverBase<ObjectSchema<{
dateType: ...;
zodVersion: ...;
}, undefined>> & {
dependsOn?: readonly [];
};
}]>;
Parameters
| Parameter | Type | Description |
|---|---|---|
options | { include?: string[]; relations: "flat" | "deep"; variants: ("full" | "create" | "update")[]; zodVersion: 3 | 4; } | - |
options.include? | string[] | Entity names to emit hooks for, applied to every namespace the generator covers. Default: every entity. |
options.relations | "flat" | "deep" | Relation handling: flat (scalar and enum fields only) or deep (nested objects for to-one relations, arrays for to-many). |
options.variants | ("full" | "create" | "update")[] | Which Zod variant a hook is built on: full (the request-body shape), create or update. At least one. Default: ['full']. |
options.zodVersion | 3 | 4 | Zod API flavor of the private Zod copy emitted under <ns>/react-tanstack/zod/ (forwarded to @kurotako/gen-zod's zodVersion). Default: 4. |
Returns
DependencyList<readonly [{
options: {
zodVersion: 3 | 4;
};
use: GeneratorDriverBase<ObjectSchema<{
dateType: ...;
zodVersion: ...;
}, undefined>> & {
dependsOn?: readonly [];
};
}]>