import { AnyConstructor, GuardedType, UnionToIntersection, GuardedStruct, ObjWithStrTag, AnyStruct, Predicate, PredicatesToGuards } from "../util"; declare type NativeTypes = { string: string; number: number; boolean: boolean; null: null; undefined: undefined; object: object; function: Function; symbol: symbol; bigint: bigint; }; interface Literal { (y: T): (x: any) => x is T; (y: T): (x: any) => x is T; (y: T): (x: any) => x is T; (y: T): (x: any) => x is T; (y: T): (x: any) => x is T; } declare type LiteralTypes = string | number | boolean | object | bigint; declare const _default: { /** Check whether object has property; object must be clearly typed ahead of time */ has: (o: O) => (x: any) => x is keyof O; /** Check whether x satisfies at least one of the predicates */ sum: [number]>(fs: Predicates) => (x: any) => x is GuardUnion; /** Check whether x satisfies at least one of the predicates */ union: [number]>(fs: Predicates) => (x: any) => x is GuardUnion; /** Check whether x is a tuple of type defined by fs */ tuple: >(fs: Predicates_1) => (xs: any) => xs is GuardTuple; /** Check whether x satisfies predicate, or is nil */ optional: (f: T) => (x: any) => x is GuardedType | null | undefined; /** Checks whether x does not satisfy the predicate * WARNING: Type guards will fail with not. Negated types are not supported in TS! * See: Negated types https://github.com/Microsoft/TypeScript/pull/29317 */ not: (f: T_1) => (x: any) => x is Exclude>; /** Exclude type represented by g from type represented by f */ exclude: (f: T_2, g: U) => (x: any) => x is Exclude, GuardedType>; /** Check whether x satisfies all predicates */ and: [number]>(fs: Predicates_2) => (x: any) => x is UnionToIntersection; /** Check whether x satisfies a base type and a refinement */ refinement: (f: T_3, g: U_1) => (x: any) => x is GuardedType & GuardedType; /** Check whether x satisfies at least one of the predicates */ or: [number]>(fs: Predicates) => (x: any) => x is GuardUnion; /** Check whether x satisfies either of two types */ either: (f: T_4, g: U_2) => (x: any) => x is GuardedType | GuardedType; /** Check whether x satisfies predicate, or is nil */ maybe: (f: T) => (x: any) => x is GuardedType | null | undefined; /** check whether x satisfies one of the given literal types */ oneOf: (ys: Y[]) => (x: any) => x is Ys[number]; /** Check whether x is a product type defined by fs */ product: >(fs: Predicates_1) => (xs: any) => xs is GuardTuple; /** Check whether all elements of x satisfy predicate */ Array: (f: T_5) => (xs: any[]) => xs is GuardedType[]; /** Check the structure of an object to match a given predicate */ Struct: (struct: Struct) => (x: any) => x is GuardedStruct; /** Literal equality of string, number, boolean, or object */ literal: Literal; /** Literal equality of string, number, boolean, or object */ equals: Literal; /** Check whether x is an instanceof X */ is: (X: T_6) => (x: any) => x is InstanceType; /** Check whether x is of type `name`, which is a possible typeof string, or "null" */ type: (name: T_7) => (x: any) => x is NativeTypes[T_7]; /** Check whether x has a [Symbol.toStringTag] value equal to `name` */ stringTag: (name: T_8) => (x: any) => x is ObjWithStrTag; /** Check whether x is null or undefined */ nil: (x: any) => x is null | undefined; /** Check whether x is null */ null: (x: any) => x is null; /** Check whether x is undefined */ undefined: (x: any) => x is undefined; /** Check whether x is a string */ string: (x: any) => x is string; /** Check whether x is a number */ number: (x: any) => x is number; /** Check whether x is a boolean */ bool: (x: any) => x is boolean; /** Check whether x is a symbol */ symbol: (x: any) => x is symbol; /** Check whether x is an object */ object: (x: any) => x is object; /** Always pass */ any: (x: U_3) => x is U_3; /** Always pass */ ignore: (x: U_3) => x is U_3; /** Always pass */ T: (x: U_3) => x is U_3; /** Always fail */ F: (x: any) => x is never; /** Always fail */ fail: (x: any) => x is never; }; export default _default; export declare const unsafe: { /** Pass a type parameter and runtype will trust the type you think it is */ as: (x: any) => x is T; /** Pass a type parameter and runtype will trust the type you think x is */ own: (x: any) => x is T; }; //# sourceMappingURL=index.d.ts.map