lib.d.ts 243 B

123456789101112
  1. type ObjectKeys<T> =
  2. T extends object
  3. ? `${Exclude<keyof T, symbol>}`[]
  4. : T extends number
  5. ? []
  6. : T extends any | string
  7. ? string[]
  8. : never
  9. interface ObjectConstructor {
  10. keys<T> (o: T): ObjectKeys<T>
  11. }