ReadonlyKeys
Category
Get Object Keys
Get union type of keys that are readonly in object type T.
Usage
ts
import type { ReadonlyKeys } from '@utype/core'
type Props = {
readonly name: string;
readonly age: number;
visible: boolean;
}
// Expect: 'name' | 'age'
type ReadonlyKeysProps = ReadonlyKeys<Props>