UNPKG

@flex-development/tutils

Version:
16 lines (15 loc) 465 B
/** * @file Type Definitions - Overwrite * @module tutils/types/Overwrite */ import type ObjectPlain from './object-plain.mjs'; /** * Replaces existing properties in `Obj` with those in `DTO`. * * @template Obj - Object to update * @template DTO - Object to update with */ declare type Overwrite<Obj extends ObjectPlain, DTO extends ObjectPlain> = { [K in keyof Obj]: K extends keyof DTO ? DTO[K] : Obj[K]; } & {}; export { type Overwrite as default };