ziron-worker
Version:
24 lines (23 loc) • 768 B
TypeScript
export type Writable<T> = {
-readonly [P in keyof T]: T[P];
};
export declare function arrayContentEquals(array1: any[], array2: any[]): boolean;
/**
* Checks if a value is deep equal to another value.
* @param v1
* @param v2
*/
export declare function deepEqual(v1: any, v2: any): boolean;
export declare function hashToIndex(key: string, size: number): number;
export declare const distinctArrayFilter: <T>(v: T, i: number, a: T[]) => boolean;
export declare function parseJoinToken(token: string): {
secret: string;
uri: string;
};
/**
* Ensures that any catched value is an instance of Error.
* @param err
* @returns
*/
export declare function ensureError(err: any): Error;
export declare function stringifyError(err: any): string | undefined;