UNPKG

@uni-ts/model

Version:

Utils for creating data models in TypeScript.

12 lines 659 B
import type { StandardSchemaV1 } from './standard-schema.js'; export declare function getSyncValidationResult<S extends StandardSchemaV1, V>(schema: S, value: V): StandardSchemaV1.Result<StandardSchemaV1.InferOutput<S>>; export declare function oneOf<const T extends unknown[]>(...values: T): T[number]; export declare function merge<const T, const E>(model: T, extend: E): Merge<T, E>; type Simplify<T> = { [KeyType in keyof T]: T[KeyType]; } & {}; export type Merge<Destination, Source> = Simplify<{ [Key in keyof Destination as Key extends keyof Source ? never : Key]: Destination[Key]; } & Source>; export {}; //# sourceMappingURL=helpers.d.ts.map