/** * This module is not part of the public API! */ /** * Type that consists of the union of all properties that are marked as optional through a question mark. * * Note that properties that have undefined in their domain, but no question mark next to the property name are *not* * included. Also note that, in strict compilation mode, TypeScript will add undefined to the domain of the property if * there is a question mark next to the property name. * * @typeparam T generic type parameter */ export declare type OptionalPropertyNames = { [K in keyof T]-?: {} extends { [_ in K]: T[K]; } ? K : never; }[keyof T]; export declare type Defined = T extends undefined ? never : T; export declare type OnlyOptionals = { [K in OptionalPropertyNames]: Defined; }; /** * Copy the values of all string-keyed enumerable own properties from the source object to the target object. * * Note the differences to * [`Object.assign()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign): * - Only properties with `string` keys are copied. * - A property of the source value that has the value `undefined` is copied only if the property key is not yet in the * target. (The check is performed using the `in` operator.) * * @param target the target object * @param source the source object * @return the target object */ export declare function assignDefined(target: T, source: U | undefined): T & U; /** * Returns a deep clone of the given object. * * This function covers only what is needed in this project! It is not an equivalent to a library function. */ export declare function deepClone(original: T): T; /** * Returns the first argument that is defined, or undefined if none of the arguments is defined. */ export declare function coalesce(left: T | undefined, right: T): T; //# sourceMappingURL=util.d.ts.map