I would like to build a string union of all the required keys of a type. Example:
interface IPerson {
readonly name: string;
age?: number;
weight: number;
}
RequiredKeys<IPerson> // a type returning "name" | "weight"
ReadonlyKeys<IPerson> // a type returning "name"
I can't figure out how to filter out optional (or readonly) keys