feat: add zod-deep-partial, partialValidator on InputSpec, and z.deepPartial re-export

This commit is contained in:
Aiden McClelland
2026-02-25 13:35:52 -07:00
parent b466e71b3b
commit 8da9d76cb4
14 changed files with 412 additions and 67 deletions

View File

@@ -8,6 +8,20 @@ export * as types from './types'
export * as T from './types'
export * as yaml from 'yaml'
export * as inits from './inits'
export { z } from 'zod'
import { z as _z } from 'zod'
import { zodDeepPartial } from 'zod-deep-partial'
import { DeepPartial } from './types'
type ZodDeepPartial = <T>(a: _z.ZodType<T>) => _z.ZodType<DeepPartial<T>>
export const z: typeof _z & {
deepPartial: ZodDeepPartial
} = Object.assign(_z, { deepPartial: zodDeepPartial as ZodDeepPartial })
// eslint-disable-next-line @typescript-eslint/no-namespace
export namespace z {
export type infer<T extends { _zod: { output: any } }> = T['_zod']['output']
export type input<T extends { _zod: { input: any } }> = T['_zod']['input']
export type output<T extends { _zod: { output: any } }> = T['_zod']['output']
}
export * as utils from './util'