parent
cff7cbb4aa
commit
ae71f5ce84
7 changed files with 193 additions and 18 deletions
29
src/state/queries/nuxs/definitions.ts
Normal file
29
src/state/queries/nuxs/definitions.ts
Normal file
|
@ -0,0 +1,29 @@
|
|||
import zod from 'zod'
|
||||
|
||||
import {BaseNux} from '#/state/queries/nuxs/types'
|
||||
|
||||
export enum Nux {
|
||||
One = 'one',
|
||||
Two = 'two',
|
||||
}
|
||||
|
||||
export const nuxNames = new Set(Object.values(Nux))
|
||||
|
||||
export type AppNux =
|
||||
| BaseNux<{
|
||||
id: Nux.One
|
||||
data: {
|
||||
likes: number
|
||||
}
|
||||
}>
|
||||
| BaseNux<{
|
||||
id: Nux.Two
|
||||
data: undefined
|
||||
}>
|
||||
|
||||
export const NuxSchemas = {
|
||||
[Nux.One]: zod.object({
|
||||
likes: zod.number(),
|
||||
}),
|
||||
[Nux.Two]: undefined,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue