PeerTube/server/types/lib.d.ts

13 lines
243 B
TypeScript
Raw Normal View History

2022-12-30 03:12:20 -06:00
type ObjectKeys<T> =
T extends object
? `${Exclude<keyof T, symbol>}`[]
: T extends number
? []
: T extends any | string
? string[]
: never
interface ObjectConstructor {
keys<T> (o: T): ObjectKeys<T>
}