Sha256: f351eaa598ba2046e3078e5480a7533be7051e4db9212bb40f4eeb84279aa24d
Contents?: true
Size: 506 Bytes
Versions: 61
Compression:
Stored size: 506 Bytes
Contents
/** Get keys of the given type as strings. Number keys are converted to strings. Use-cases: - Get string keys from a type which may have number keys. - Makes it possible to index using strings retrieved from template types. @example ``` import type {StringKeyOf} from 'type-fest'; type Foo = { 1: number, stringKey: string, }; type StringKeysOfFoo = StringKeyOf<Foo>; //=> '1' | 'stringKey' ``` @category Object */ export type StringKeyOf<BaseType> = `${Extract<keyof BaseType, string | number>}`;
Version data entries
61 entries across 61 versions & 3 rubygems