generated from bscotch/typescript-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Allow enabling/disabling debug logging via BravoClient methods,…
… allowing finer control over what gets logged.
- Loading branch information
1 parent
6b12ebb
commit f670267
Showing
5 changed files
with
96 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
type Prev = [ | ||
never, | ||
0, | ||
1, | ||
2, | ||
3, | ||
4, | ||
5, | ||
6, | ||
7, | ||
8, | ||
9, | ||
10, | ||
11, | ||
12, | ||
13, | ||
14, | ||
15, | ||
16, | ||
17, | ||
18, | ||
19, | ||
20, | ||
...0[] | ||
]; | ||
|
||
type Join<K, P, Sep extends string = ':'> = K extends string | ||
? P extends string | ||
? `${K}${'' extends P ? '' : Sep}${P}` | ||
: never | ||
: never; | ||
|
||
export type DebugPaths<T, Depth extends number = 10> = [Depth] extends [never] | ||
? never | ||
: T extends Record<string, any> | ||
? { | ||
[K in keyof T]-?: K extends string | ||
? | ||
| (T[K] extends null ? `${K}` : `${K}:*`) | ||
| Join<K, DebugPaths<T[K], Prev[Depth]>> | ||
: never; | ||
}[keyof T] | ||
: ''; | ||
|
||
// type Paths<T, Depth extends number = 10> = [Depth] extends [never] | ||
// ? never | ||
// : T extends Record<string, any> | ||
// ? { | ||
// [K in keyof T]-?: K extends string | ||
// ? `${K}` | Join<K, Paths<T[K], Prev[Depth]>> | ||
// : never; | ||
// }[keyof T] | ||
// : ''; | ||
|
||
// type Leaves<T, D extends number = 10> = [D] extends [never] | ||
// ? never | ||
// : T extends Record<string, any> | ||
// ? { [K in keyof T]-?: Join<K, Leaves<T[K], Prev[D]>> }[keyof T] | ||
// : ''; |