KeysOf<T>: T extends Record<string, unknown>
    ? keyof T
    : never

Extracts the type info for keys inside an object.

Type Parameters

  • T

Example

type Value = KeysOf<{ logLevel: 'WARN', silent: false, verbose: 3 }>;
// => "logLevel" | "silent" | "verbose"

Generated using TypeDoc