mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-03 09:20:08 +00:00
types(util): recursive CamelCaseProps and SnakeCaseProps (#689)
* Update util.ts * better names * add the old one back
This commit is contained in:
@@ -109,9 +109,9 @@ export type CamelCase<K> = K extends string
|
||||
: K;
|
||||
|
||||
export type CamelCaseProps<T> = {
|
||||
[K in keyof T as CamelCase<K>]: T[K];
|
||||
[K in keyof T as CamelCase<K>]: CamelCaseProps<T[K]>;
|
||||
};
|
||||
|
||||
export type SnakeCaseProps<T> = {
|
||||
[K in keyof T as SnakeCase<K>]: T[K];
|
||||
[K in keyof T as SnakeCase<K>]: SnakeCaseProps<T[K]>;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user