You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
251 B
TypeScript
12 lines
251 B
TypeScript
4 years ago
|
export type NumberKeys<O> = {
|
||
|
[K in keyof O]: number extends O[K] ? K : never
|
||
|
}[keyof O];
|
||
|
|
||
|
export type ArrayKeys<O, P = any> = {
|
||
|
[K in keyof O]: P[] extends O[K] ? K : never
|
||
|
}[keyof O]
|
||
|
|
||
|
export type Value<O, V = ''> = {
|
||
|
[K in keyof O]: V
|
||
|
}
|