@action-land/component
Version:
Basic interface for a component
12 lines (11 loc) • 324 B
TypeScript
/**
* Infer type of values from a {[key]: value } object
* @typeparam O key-value pair object
* ```typescript
* LObjectValues<{a: string, b: number, c: 1}> // outputs string | number | 1
* ```
* @category ComponentNext
*/
export declare type LObjectValues<O> = O extends {
[k: string]: infer S;
} ? S : unknown;