cmux/node_modules/json-schema-to-ts/lib/utils/optionalProps.d.ts
2026-01-29 17:36:26 -08:00

9 lines
291 B
TypeScript

/**
* Extract the names of an object's optional properties
*
* @param O Object
* @return Property names
*/
export declare type OptionalProps<O extends Record<string | number | symbol, unknown>> = Exclude<{
[K in keyof O]: undefined extends O[K] ? K : never;
}[keyof O], undefined>;