UNPKG

@linzjs/step-ag-grid

Version:

[![semantic-release: angular](https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release) > Reusable [ag-grid](https://www.ag-grid.com/) component for LINZ / Toitū te whenua.

9 lines (6 loc) 399 B
export type KeysOfType<TObject, TValue> = { [K in keyof TObject]: TObject[K] extends TValue ? K : never; }[keyof TObject]; export const typedKeys = <T extends object>(obj: T): (keyof T)[] => Object.keys(obj) as (keyof T)[]; export const typedEntries = <T extends object>(obj: T): { [K in keyof T]-?: [K, T[K]] }[keyof T][] => Object.entries(obj) as { [K in keyof T]-?: [K, T[K]] }[keyof T][];