UNPKG

333 BTypeScriptView Raw
1import { Keys } from './Keys';
2/**
3 * Get the known keys of an [[Object]]
4 * @param O
5 * @returns [[Key]]
6 * @example
7 * ```ts
8 * ```
9 */
10export declare type KnownKeys<O extends object> = {
11 [K in keyof O]: string extends K ? never : number extends K ? never : K;
12} extends {
13 [K in keyof O]: infer U;
14} ? U & Keys<O> : never;