UNPKG

@flex-development/tutils

Version:
19 lines (18 loc) 471 B
/** * @file Type Definitions - KeysOptional * @module tutils/types/KeysOptional */ import type ObjectPlain from './object-plain.mjs'; /** * Creates a list of optional properties in `T`. * * @todo Get nested properties recursively * * @template T - Object type */ declare type KeysOptional<T extends ObjectPlain> = { [K in keyof T]-?: undefined extends { [K2 in keyof T]: K2; }[K] ? K : never; }[keyof T]; export { type KeysOptional as default };