/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * */ export type Check = (val: unknown, name?: string) => Error | T; export type InferCheckType = T extends Check ? U : /** * > 11 | export type InferCheckType = T extends Check ? U : empty; * | ^^^^^ Unsupported feature: Translating "empty type" is currently not supported. **/ any; type Msg = (value: unknown, name?: string) => string; type PrimitiveChecker = (message?: Msg) => Check; export declare const string: PrimitiveChecker; export declare type string = typeof string; export declare const nullish: PrimitiveChecker; export declare type nullish = typeof nullish; export declare const optional: ($$PARAM_0$$: Check) => Check; export declare type optional = typeof optional; export declare const boolean: PrimitiveChecker; export declare type boolean = typeof boolean; export declare const number: PrimitiveChecker; export declare type number = typeof number; export declare const func: (msg?: Msg) => Check; export declare type func = typeof func; export declare const literal: ( $$PARAM_0$$: T, msg?: Msg, ) => Check; export declare type literal = typeof literal; export declare const array: ( $$PARAM_0$$: Check, msg?: Msg, ) => Check>; export declare type array = typeof array; type ObjOfChecks }> = Readonly<{ [K in keyof T]: InferCheckType }>; export declare const object: < T extends { readonly [$$Key$$: string]: Check }, >( $$PARAM_0$$: T, msg?: Msg, ) => Check>; export declare type object = typeof object; export declare const objectOf: ( $$PARAM_0$$: Check, message?: Msg, ) => Check<{ readonly [$$Key$$: string]: T }>; export declare type objectOf = typeof objectOf; export declare const unionOf: ( a: Check, b: Check, message?: Msg, ) => Check; export declare type unionOf = typeof unionOf; export declare const unionOf3: ( a: Check, b: Check, c: Check, message?: Msg, ) => Check; export declare type unionOf3 = typeof unionOf3; export declare const unionOf4: ( a: Check, b: Check, c: Check, d: Check, message?: Msg, ) => Check; export declare type unionOf4 = typeof unionOf4; export declare const logAndDefault: ( check: Check, value: unknown, def: T, name?: string, ) => T; export declare type logAndDefault = typeof logAndDefault;