/**
 Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
 */
type Primitive = null | undefined | string | number | boolean | symbol | bigint;
/**
 Matches a [`class` constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes).
 */
type Constructor<T, Arguments extends unknown[] = any[]> = new (...arguments_: Arguments) => T;
/**
 Matches a [`class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes).
 */
type Class<T, Arguments extends unknown[] = any[]> = Constructor<T, Arguments> & {
    prototype: T;
};
/**
 Matches any [typed array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray), like `Uint8Array` or `Float64Array`.
 */
type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array;
declare global {
    interface SymbolConstructor {
        readonly observable: symbol;
    }
}
/**
 Matches a value that is like an [Observable](https://github.com/tc39/proposal-observable).
 */
type ObservableLike = {
    subscribe(observer: (value: unknown) => void): void;
    [Symbol.observable](): ObservableLike;
};
type Falsy = false | 0 | 0n | '' | null | undefined;
type ArrayLike<T> = {
    readonly [index: number]: T;
    readonly length: number;
};
type NodeStream = {
    pipe<T extends NodeJS.WritableStream>(destination: T, options?: {
        end?: boolean;
    }): T;
} & NodeJS.EventEmitter;
type Predicate = (value: unknown) => boolean;
type NonEmptyString = string & {
    0: string;
};
type Whitespace = ' ';
type URLString = string & {
    readonly __brand: 'UrlString';
};
type ExtractFromGlobalConstructors<Name extends string> = Name extends string ? typeof globalThis extends Record<Name, new (...arguments_: any[]) => infer T> ? T : never : never;
type NodeBuffer = ExtractFromGlobalConstructors<'Buffer'>;
declare const objectTypeNames: readonly ["Function", "Generator", "AsyncGenerator", "GeneratorFunction", "AsyncGeneratorFunction", "AsyncFunction", "Observable", "Array", "Buffer", "Blob", "Object", "RegExp", "Date", "Error", "Map", "Set", "WeakMap", "WeakSet", "WeakRef", "ArrayBuffer", "SharedArrayBuffer", "DataView", "Promise", "URL", "FormData", "URLSearchParams", "HTMLElement", "NaN", "Int8Array", "Uint8Array", "Uint8ClampedArray", "Int16Array", "Uint16Array", "Int32Array", "Uint32Array", "Float32Array", "Float64Array", "BigInt64Array", "BigUint64Array"];
type ObjectTypeName = (typeof objectTypeNames)[number];
declare const primitiveTypeNames: readonly ["null", "undefined", "string", "number", "bigint", "boolean", "symbol"];
type PrimitiveTypeName = (typeof primitiveTypeNames)[number];
type TypeName = ObjectTypeName | PrimitiveTypeName;
declare const assertionTypeDescriptions: readonly ["positive number", "negative number", "Class", "string with a number", "null or undefined", "Iterable", "AsyncIterable", "native Promise", "EnumCase", "string with a URL", "truthy", "falsy", "primitive", "integer", "plain object", "TypedArray", "array-like", "tuple-like", "Node.js Stream", "infinite number", "empty array", "non-empty array", "empty string", "empty string or whitespace", "non-empty string", "non-empty string and not whitespace", "empty object", "non-empty object", "empty set", "non-empty set", "empty map", "non-empty map", "PropertyKey", "even integer", "odd integer", "T", "in range", "predicate returns truthy for any value", "predicate returns truthy for all values", "valid Date", "valid length", "whitespace string", "json", "base64", "ipv4", "ipv6", "finite", "hexColor", "Function", "Generator", "AsyncGenerator", "GeneratorFunction", "AsyncGeneratorFunction", "AsyncFunction", "Observable", "Array", "Buffer", "Blob", "Object", "RegExp", "Date", "Error", "Map", "Set", "WeakMap", "WeakSet", "WeakRef", "ArrayBuffer", "SharedArrayBuffer", "DataView", "Promise", "URL", "FormData", "URLSearchParams", "HTMLElement", "NaN", "Int8Array", "Uint8Array", "Uint8ClampedArray", "Int16Array", "Uint16Array", "Int32Array", "Uint32Array", "Float32Array", "Float64Array", "BigInt64Array", "BigUint64Array", "null", "undefined", "string", "number", "bigint", "boolean", "symbol"];
type AssertionTypeDescription = (typeof assertionTypeDescriptions)[number];
type TypeGuard<T> = (value: unknown) => value is T;
type ResolveTypesOfTypeGuardsTuple<TypeGuardsOfT, ResultOfT extends unknown[] = []> = TypeGuardsOfT extends [TypeGuard<infer U>, ...infer TOthers] ? ResolveTypesOfTypeGuardsTuple<TOthers, [...ResultOfT, U]> : TypeGuardsOfT extends undefined[] ? ResultOfT : never;

/**
 Note: [Prefer using `Uint8Array` instead of `Buffer`.](https://sindresorhus.com/blog/goodbye-nodejs-buffer)
 */
declare function isBuffer(value: unknown): value is NodeBuffer;
declare function isNodeStream(value: unknown): value is NodeStream;

declare function isEmptyArray(value: unknown): value is never[];
declare function isNonEmptyArray<T = unknown, Item = unknown>(value: T | Item[]): value is [Item, ...Item[]];
declare function isEmptyMap(value: unknown): value is Map<never, never>;
declare function isNonEmptyMap<Key = unknown, Value = unknown>(value: unknown): value is Map<Key, Value>;
declare function isEmptySet(value: unknown): value is Set<never>;
declare function isNonEmptySet<T = unknown>(value: unknown): value is Set<T>;
declare function isEmptyObject<Key extends keyof any = string>(value: unknown): value is Record<Key, never>;
declare function isNonEmptyObject<Key extends keyof any = string, Value = unknown>(value: unknown): value is Record<Key, Value>;

declare function isFunction(value: unknown): value is Function;
declare function isAsyncFunction<T = unknown>(value: unknown): value is (...arguments_: any[]) => Promise<T>;
declare function isGeneratorFunction(value: unknown): value is GeneratorFunction;
declare function isAsyncGeneratorFunction(value: unknown): value is (...arguments_: any[]) => Promise<unknown>;
declare function isBoundFunction(value: unknown): value is Function;
declare function isClass<T = unknown>(value: unknown): value is Class<T>;

declare function isAll<T1>(predicates: [TypeGuard<T1>]): TypeGuard<T1>;
declare function isAll<T1, T2>(predicates: [TypeGuard<T1>, TypeGuard<T2>]): TypeGuard<T1 & T2>;
declare function isAll<T1, T2, T3>(predicates: [TypeGuard<T1>, TypeGuard<T2>, TypeGuard<T3>]): TypeGuard<T1 & T2 & T3>;
declare function isAll<T1, T2, T3, T4>(predicates: [TypeGuard<T1>, TypeGuard<T2>, TypeGuard<T3>, TypeGuard<T4>]): TypeGuard<T1 & T2 & T3 & T4>;
declare function isAll<T1, T2, T3, T4, T5>(predicates: [TypeGuard<T1>, TypeGuard<T2>, TypeGuard<T3>, TypeGuard<T4>, TypeGuard<T5>]): TypeGuard<T1 & T2 & T3 & T4 & T5>;
declare function isAll(predicates: ReadonlyArray<TypeGuard<unknown>>): TypeGuard<unknown>;
declare function isAll(predicates: readonly Predicate[]): Predicate;
declare function isAll(predicate: Predicate | readonly Predicate[], ...values: unknown[]): boolean;
declare function isAny<T1>(predicates: [TypeGuard<T1>]): TypeGuard<T1>;
declare function isAny<T1, T2>(predicates: [TypeGuard<T1>, TypeGuard<T2>]): TypeGuard<T1 | T2>;
declare function isAny<T1, T2, T3>(predicates: [TypeGuard<T1>, TypeGuard<T2>, TypeGuard<T3>]): TypeGuard<T1 | T2 | T3>;
declare function isAny<T1, T2, T3, T4>(predicates: [TypeGuard<T1>, TypeGuard<T2>, TypeGuard<T3>, TypeGuard<T4>]): TypeGuard<T1 | T2 | T3 | T4>;
declare function isAny<T1, T2, T3, T4, T5>(predicates: [TypeGuard<T1>, TypeGuard<T2>, TypeGuard<T3>, TypeGuard<T4>, TypeGuard<T5>]): TypeGuard<T1 | T2 | T3 | T4 | T5>;
declare function isAny(predicates: ReadonlyArray<TypeGuard<unknown>>): TypeGuard<unknown>;
declare function isAny(predicates: readonly Predicate[]): Predicate;
declare function isAny(predicate: Predicate | readonly Predicate[], ...values: unknown[]): boolean;
declare function isOptional<T>(value: unknown, predicate: (value: unknown) => value is T): value is T | undefined;

declare function isObservable(value: unknown): value is ObservableLike;
declare function isIterable<T = unknown>(value: unknown): value is Iterable<T>;
declare function isAsyncIterable<T = unknown>(value: unknown): value is AsyncIterable<T>;
declare function isGenerator(value: unknown): value is Generator;
declare function isAsyncGenerator(value: unknown): value is AsyncGenerator;
declare function isEnumCase<T = unknown>(value: unknown, targetEnum: T): value is T[keyof T];
declare function isDirectInstanceOf<T>(instance: unknown, class_: Class<T>): instance is T;
declare function isValidDate(value: unknown): value is Date;
declare function isArrayLike<T = unknown>(value: unknown): value is ArrayLike<T>;
declare function isTupleLike<T extends Array<TypeGuard<unknown>>>(value: unknown, guards: [...T]): value is ResolveTypesOfTypeGuardsTuple<T>;
declare function isPropertyKey(value: unknown): value is PropertyKey;

declare function isInteger(value: unknown): value is number;
declare function isSafeInteger(value: unknown): value is number;
declare function isInfinite(value: unknown): value is number;
declare function isPositiveNumber(value: unknown): value is number;
declare function isNegativeNumber(value: unknown): value is number;
declare function isEvenInteger(value: unknown): value is number;
declare function isOddInteger(value: unknown): value is number;
declare function isInRange(value: number, range: number | [number, number]): value is number;
declare function isValidLength(value: unknown): value is number;
declare function isFinite(value: unknown): value is number;

declare function isObject(value: unknown): value is object;
declare function isPlainObject<Value = unknown>(value: unknown): value is Record<PropertyKey, Value>;
declare function isArray<T = unknown>(value: unknown, assertion?: (value: T) => value is T): value is T[];
declare function isMap<Key = unknown, Value = unknown>(value: unknown): value is Map<Key, Value>;
declare function isSet<T = unknown>(value: unknown): value is Set<T>;
declare function isWeakMap<Key extends object = object, Value = unknown>(value: unknown): value is WeakMap<Key, Value>;
declare function isWeakSet(value: unknown): value is WeakSet<object>;
declare function isWeakRef(value: unknown): value is WeakRef<object>;
declare function isArrayBuffer(value: unknown): value is ArrayBuffer;
declare function isSharedArrayBuffer(value: unknown): value is SharedArrayBuffer;
declare function isDataView(value: unknown): value is DataView;
declare function isTypedArray(value: unknown): value is TypedArray;
declare function isInt8Array(value: unknown): value is Int8Array;
declare function isUint8Array(value: unknown): value is Uint8Array;
declare function isUint8ClampedArray(value: unknown): value is Uint8ClampedArray;
declare function isInt16Array(value: unknown): value is Int16Array;
declare function isUint16Array(value: unknown): value is Uint16Array;
declare function isInt32Array(value: unknown): value is Int32Array;
declare function isUint32Array(value: unknown): value is Uint32Array;
declare function isFloat32Array(value: unknown): value is Float32Array;
declare function isFloat64Array(value: unknown): value is Float64Array;
declare function isBigInt64Array(value: unknown): value is BigInt64Array;
declare function isBigUint64Array(value: unknown): value is BigUint64Array;
declare function isRegExp(value: unknown): value is RegExp;
declare function isDate(value: unknown): value is Date;
declare function isError(value: unknown): value is Error;
declare function isPromise<T = unknown>(value: unknown): value is Promise<T>;
declare function isNativePromise<T = unknown>(value: unknown): value is Promise<T>;
declare function hasPromiseApi<T = unknown>(value: unknown): value is Promise<T>;

declare function isPrimitiveTypeName(name: unknown): name is PrimitiveTypeName;
declare function isString(value: unknown): value is string;
declare function isNumber(value: unknown): value is number;
declare function isBoolean(value: unknown): value is boolean;
declare function isBigint(value: unknown): value is bigint;
declare function isSymbol(value: unknown): value is symbol;
declare function isUndefined(value: unknown): value is undefined;
declare function isNull(value: unknown): value is null;
declare function isNan(value: unknown): value is number;
declare function isPrimitive(value: unknown): value is Primitive;
declare function isNullOrUndefined(value: unknown): value is null | undefined;
declare function isTruthy<T>(value: T | Falsy): value is T;
declare function isFalsy(value: unknown): value is Falsy;

declare function isEmptyString(value: unknown): value is '';
declare function isWhitespaceString(value: unknown): value is Whitespace;
declare function isEmptyStringOrWhitespace(value: unknown): value is '' | Whitespace;
declare function isNonEmptyString(value: unknown): value is NonEmptyString;
declare function isNonEmptyStringAndNotWhitespace(value: unknown): value is NonEmptyString;
declare function isNumericString(value: unknown): value is `${number}`;
declare function isJson(value: unknown): boolean;
declare function isBase64(value: unknown): boolean;

declare function isHtmlElement(value: unknown): value is HTMLElement;
declare function isBlob(value: unknown): value is Blob;
declare function isFormData(value: unknown): value is FormData;
declare function isUrlSearchParams(value: unknown): value is URLSearchParams;
declare function isUrlInstance(value: unknown): value is URL;
declare function isUrlString(value: unknown): value is URLString;
declare function isIpv4(value: unknown): boolean;
declare function isIpv6(value: unknown): boolean;
declare function isHexColor(value: unknown): boolean;

declare function detect(value: unknown): TypeName;
declare const is: typeof detect & {
    all: typeof isAll;
    any: typeof isAny;
    array: typeof isArray;
    arrayBuffer: typeof isArrayBuffer;
    arrayLike: typeof isArrayLike;
    asyncFunction: typeof isAsyncFunction;
    asyncGenerator: typeof isAsyncGenerator;
    asyncGeneratorFunction: typeof isAsyncGeneratorFunction;
    asyncIterable: typeof isAsyncIterable;
    base64: typeof isBase64;
    bigint: typeof isBigint;
    bigInt64Array: typeof isBigInt64Array;
    bigUint64Array: typeof isBigUint64Array;
    blob: typeof isBlob;
    boolean: typeof isBoolean;
    boundFunction: typeof isBoundFunction;
    buffer: typeof isBuffer;
    class: typeof isClass;
    dataView: typeof isDataView;
    date: typeof isDate;
    detect: typeof detect;
    directInstanceOf: typeof isDirectInstanceOf;
    emptyArray: typeof isEmptyArray;
    emptyMap: typeof isEmptyMap;
    emptyObject: typeof isEmptyObject;
    emptySet: typeof isEmptySet;
    emptyString: typeof isEmptyString;
    emptyStringOrWhitespace: typeof isEmptyStringOrWhitespace;
    enumCase: typeof isEnumCase;
    error: typeof isError;
    evenInteger: typeof isEvenInteger;
    falsy: typeof isFalsy;
    finite: typeof isFinite;
    float32Array: typeof isFloat32Array;
    float64Array: typeof isFloat64Array;
    formData: typeof isFormData;
    function: typeof isFunction;
    generator: typeof isGenerator;
    generatorFunction: typeof isGeneratorFunction;
    hexColor: typeof isHexColor;
    htmlElement: typeof isHtmlElement;
    infinite: typeof isInfinite;
    inRange: typeof isInRange;
    int16Array: typeof isInt16Array;
    int32Array: typeof isInt32Array;
    int8Array: typeof isInt8Array;
    integer: typeof isInteger;
    ipv4: typeof isIpv4;
    ipv6: typeof isIpv6;
    iterable: typeof isIterable;
    json: typeof isJson;
    map: typeof isMap;
    nan: typeof isNan;
    nativePromise: typeof isNativePromise;
    negativeNumber: typeof isNegativeNumber;
    nodeStream: typeof isNodeStream;
    nonEmptyArray: typeof isNonEmptyArray;
    nonEmptyMap: typeof isNonEmptyMap;
    nonEmptyObject: typeof isNonEmptyObject;
    nonEmptySet: typeof isNonEmptySet;
    nonEmptyString: typeof isNonEmptyString;
    nonEmptyStringAndNotWhitespace: typeof isNonEmptyStringAndNotWhitespace;
    null: typeof isNull;
    nullOrUndefined: typeof isNullOrUndefined;
    number: typeof isNumber;
    numericString: typeof isNumericString;
    object: typeof isObject;
    observable: typeof isObservable;
    oddInteger: typeof isOddInteger;
    optional: typeof isOptional;
    plainObject: typeof isPlainObject;
    positiveNumber: typeof isPositiveNumber;
    primitive: typeof isPrimitive;
    promise: typeof isPromise;
    propertyKey: typeof isPropertyKey;
    regExp: typeof isRegExp;
    safeInteger: typeof isSafeInteger;
    set: typeof isSet;
    sharedArrayBuffer: typeof isSharedArrayBuffer;
    string: typeof isString;
    symbol: typeof isSymbol;
    truthy: typeof isTruthy;
    tupleLike: typeof isTupleLike;
    typedArray: typeof isTypedArray;
    uint16Array: typeof isUint16Array;
    uint32Array: typeof isUint32Array;
    uint8Array: typeof isUint8Array;
    uint8ClampedArray: typeof isUint8ClampedArray;
    undefined: typeof isUndefined;
    urlInstance: typeof isUrlInstance;
    urlSearchParams: typeof isUrlSearchParams;
    urlString: typeof isUrlString;
    validDate: typeof isValidDate;
    validLength: typeof isValidLength;
    weakMap: typeof isWeakMap;
    weakRef: typeof isWeakRef;
    weakSet: typeof isWeakSet;
    whitespaceString: typeof isWhitespaceString;
};

export { type ArrayLike, type AssertionTypeDescription, type Class, type NodeStream, type ObservableLike, type Predicate, type Primitive, type TypeName, type TypedArray, type URLString, is as default, hasPromiseApi, is, isAll, isAny, isArray, isArrayBuffer, isArrayLike, isAsyncFunction, isAsyncGenerator, isAsyncGeneratorFunction, isAsyncIterable, isBase64, isBigInt64Array, isBigUint64Array, isBigint, isBlob, isBoolean, isBoundFunction, isBuffer, isClass, isDataView, isDate, isDirectInstanceOf, isEmptyArray, isEmptyMap, isEmptyObject, isEmptySet, isEmptyString, isEmptyStringOrWhitespace, isEnumCase, isError, isEvenInteger, isFalsy, isFinite, isFloat32Array, isFloat64Array, isFormData, isFunction, isGenerator, isGeneratorFunction, isHexColor, isHtmlElement, isInRange, isInfinite, isInt16Array, isInt32Array, isInt8Array, isInteger, isIpv4, isIpv6, isIterable, isJson, isMap, isNan, isNativePromise, isNegativeNumber, isNodeStream, isNonEmptyArray, isNonEmptyMap, isNonEmptyObject, isNonEmptySet, isNonEmptyString, isNonEmptyStringAndNotWhitespace, isNull, isNullOrUndefined, isNumber, isNumericString, isObject, isObservable, isOddInteger, isOptional, isPlainObject, isPositiveNumber, isPrimitive, isPrimitiveTypeName, isPromise, isPropertyKey, isRegExp, isSafeInteger, isSet, isSharedArrayBuffer, isString, isSymbol, isTruthy, isTupleLike, isTypedArray, isUint16Array, isUint32Array, isUint8Array, isUint8ClampedArray, isUndefined, isUrlInstance, isUrlSearchParams, isUrlString, isValidDate, isValidLength, isWeakMap, isWeakRef, isWeakSet, isWhitespaceString };
