export const is = { available: (x: X): x is NonNullable => x !== undefined && x !== null, unavailable: (x: any): x is (undefined | null) => x === undefined || x === null, /** @deprecated use `unavailable` instead */ void: (x: any): x is (undefined | null) => x === undefined || x === null, /** @deprecated use `available` instead */ defined: (x: X): x is NonNullable => x !== undefined && x !== null, boolean: (x: any): x is boolean => typeof x === "boolean", number: (x: any): x is number => typeof x === "number", string: (x: any): x is string => typeof x === "string", bigint: (x: any): x is bigint => typeof x === "bigint", object: (x: X): x is object & NonNullable => typeof x === "object" && x !== null, array: (x: any | any[]): x is any[] => Array.isArray(x), }