sveltekit-superforms-5
Version:
<p align="center"> <img src="https://github.com/ciscoheat/sveltekit-superforms/raw/main/logo.svg" width="150px" align="center" alt="Superforms logo" /> <h1 align="center">Superforms 💥</h1> <p align="center">Making SvelteKit forms a pleasure to use!
14 lines (13 loc) • 664 B
TypeScript
import type { JSONSchema } from './index.js';
import type { SchemaType } from './schemaInfo.js';
export declare function defaultValues<T = Record<string, unknown>>(schema: JSONSchema, isOptional?: boolean, path?: string[]): T;
export declare function defaultValue(type: SchemaType, enumType: unknown[] | undefined): unknown;
export declare function defaultTypes(schema: JSONSchema, path?: string[]): SchemaTypeObject;
export type SchemaFieldType = {
__types: (SchemaType | 'null' | 'undefined')[];
__items?: SchemaTypeObject;
};
type SchemaTypeObject = {
[Key in Exclude<string, '_types' | '_items'>]: SchemaTypeObject;
} & SchemaFieldType;
export {};