export type DistributiveOmit = T extends any ? Omit : never; /** * The final type is string but IDE will suggest values from T * Use (string & {}) for better autocomplete https://github.com/Microsoft/TypeScript/issues/29729#issuecomment-505826972 * * @example * ``` * type Lang = StringWithSuggest<'en' | 'rs'>; * * const lang: Lang = ''; * // Start typing in your TypeScript-enabled IDE. * // You **will** get auto-completion for `en` and `rs` literals. * ``` */ export type StringWithSuggest = `${T}` | (string & {}); export type DeepPartial = N extends 0 ? T : Partial<{ [P in keyof T]: DeepPartial; }>;