保誠-保戶業務員媒合平台
HelenHuang
2022-06-09 9bdb95c9e34cef640534e5e5a1e2225a80442000
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/**
 * An object whose all properties have the same type.
 */
export declare type Dictionary<T = any> = {
    [key: string]: T;
};
/**
 * Returns the keys of T that match Dictionary<U> and are not arrays.
 */
export declare type DictionaryKeyof<T, U = any> = Exclude<KeyOf<T, Dictionary<U>>, KeyOf<T, any[]>>;
/**
 * Returns the keys of T that match U.
 */
export declare type KeyOf<T, U> = Exclude<{
    [K in keyof T]: T[K] extends U ? K : never;
}[keyof T], undefined>;
/**
 * An array whose first element is not undefined.
 */
export declare type NotEmptyArray<T = any> = [T, ...T[]];
/**
 * Returns the type of a Dictionary or array values.
 */
export declare type ValueOf<T> = T extends (infer U)[] ? U : T[keyof T];
/**
 * Typing wrapper around assert.notStrictEqual()
 */
export declare function assertNotStrictEqual<N, T>(actual: T | N, expected: N, message?: string | Error): asserts actual is Exclude<T, N>;
/**
 * Asserts actual is a single key, not a key array or a key map.
 */
export declare function assertSingleKey(actual: string | string[] | Dictionary): asserts actual is string;
/**
 * Typing wrapper around Object.keys()
 */
export declare function objectKeys<T>(object: T): (keyof T)[];