mirror of
https://github.com/hexastack/hexabot
synced 2025-02-20 11:28:45 +00:00
fix(api): exclude functions as nested types
This commit is contained in:
parent
7a7ebb21bc
commit
2781abbc56
@ -16,11 +16,14 @@ export type TFilterKeysOfNeverType<T> = Omit<T, TFilterKeysOfType<T, []>>;
|
|||||||
|
|
||||||
export type NestedKeys<T> = T extends object
|
export type NestedKeys<T> = T extends object
|
||||||
? {
|
? {
|
||||||
[K in keyof T]: Array<any> extends T[K]
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||||
? Exclude<K, symbol>
|
[K in keyof T]: T[K] extends Function
|
||||||
: K extends symbol
|
? never
|
||||||
|
: Array<any> extends T[K]
|
||||||
? Exclude<K, symbol>
|
? Exclude<K, symbol>
|
||||||
: `${Exclude<K, symbol>}${'' | `.${NestedKeys<T[K]>}`}`;
|
: K extends symbol
|
||||||
|
? Exclude<K, symbol>
|
||||||
|
: `${Exclude<K, symbol>}${'' | `.${NestedKeys<T[K]>}`}`;
|
||||||
}[keyof T]
|
}[keyof T]
|
||||||
: never;
|
: never;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user