@xylabs/typeof
Version:
Base functionality used throughout XY Labs TypeScript/JavaScript libraries
12 lines • 810 B
TypeScript
export type TypedValue = bigint | string | number | boolean | null | TypedObject | TypedArray | Function | symbol | undefined;
export type TypedKey<T extends string | void = void> = T extends string ? T : string | number | symbol;
export type TypedObject = {
[key: TypedKey]: TypedValue;
} | object;
export type TypedArray = TypedValue[];
export declare const isTypedKey: (value: unknown) => value is TypedKey;
export declare const isTypedValue: (value: unknown) => value is TypedValue;
export declare const isTypedArray: (value: unknown) => value is TypedArray;
export declare const isValidTypedFieldPair: (pair: [key: unknown, value: unknown]) => pair is [key: TypedKey, value: TypedValue];
export declare const isTypedObject: (value: unknown) => value is TypedObject;
//# sourceMappingURL=Typed.d.ts.map