import type { Sure, InferGood, InferBad, MetaObj } from './core.js'; import { KVPair, Objectify, Prettify, Unionize } from './utils.js'; type PickOptionalsGood> = T extends { v: Sure>; } ? { k: T['k']; v: InferGood; } : never; type PickNonOptionals> = T extends { v: Sure>; } ? never : { k: T['k']; v: InferGood; }; export type InferSchemaGood> = Prettify>>> & Objectify>>>; /** Necessary because `typeof x` is not a type guard. */ export declare function isObject(x: unknown): x is Record; /** * Makes a object property `optional` * It doesn't make it nullable or undefinedable * * The `optional` function will be checked `only` by the `object` function. * In all other cases it will the value will not be perceived as optional. */ export declare function optional>(schema: TSchema): Sure, InferGood, unknown, MetaObj<{ type: 'optional'; schema: TSchema; }>>; export declare function object>>(schema: TSchema): Sure<{ [K in keyof TSchema & string]?: InferBad; }, InferSchemaGood, unknown, MetaObj<{ type: 'object'; schema: TSchema; }>>; export {}; //# sourceMappingURL=object.d.ts.map