UNPKG

@studiohyperdrive/utils

Version:
12 lines (11 loc) 523 B
/** * Merges all arguments into a single object, as long as the property has a value * * @param start - The start property we wish to merge our data into * @param properties - A series of single value objects that are merged based on whether the value exists */ export declare const merge: <ResultType extends Object>(start: Partial<ResultType>, ...properties: KeyValuePair<ResultType>[]) => ResultType; type KeyValuePair<DataType> = { [Key in keyof DataType]: [Key, DataType[Key]]; }[keyof DataType]; export {};