any-serialize
Version:
Serialize / Deserialize any JavaScript objects, as long as you provides how-to. I have already provided `Date`, `RegExp`, `Set` and `Function`.
14 lines • 881 B
TypeScript
export declare type TypeNativeSerializable = 'string' | 'number' | 'boolean';
export declare type TypeNativeNonSerializable = 'bigint' | 'symbol' | 'undefined' | 'function' | 'object';
export declare type TypeExtra = 'Null' | 'Array' | 'Named' | 'Constructor' | 'NaN' | 'Infinity';
export declare type TypeAll = TypeNativeSerializable | TypeNativeNonSerializable | TypeExtra;
export declare function getTypeofDetailed(a: any): {
typeof_: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function";
is: TypeAll[];
id?: Function | undefined;
description?: string | undefined;
entry: any;
};
export declare function isArray(a: any, t?: ReturnType<typeof getTypeofDetailed>): a is any[];
export declare function isObject(a: any, t?: ReturnType<typeof getTypeofDetailed>): a is Record<string, any>;
//# sourceMappingURL=type.d.ts.map