Skip to content

Commit

Permalink
fix(types): mix support any number of sources
Browse files Browse the repository at this point in the history
  • Loading branch information
fjc0k committed Jul 6, 2020
1 parent 5d7e89a commit d8ab580
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions types/Util.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,19 @@ export const Util: {
isObject(value: any): value is object;

/**
* 深拷贝,最多支持 3 个对象
* 深拷贝。
*/
deepMix<T extends Record<any, any>>(
target: T,
source1: PartialDeep<T>,
source2?: PartialDeep<T>,
source3?: PartialDeep<T>,
target: PartialDeep<T>,
...sources: Array<PartialDeep<T>>
): T;

/**
* 浅拷贝,最多支持 3 个对象
* 浅拷贝。
*/
mix<T extends Record<any, any>>(
target: T,
source1: Partial<T>,
source2?: Partial<T>,
source3?: Partial<T>,
target: PartialDeep<T>,
...sources: Array<PartialDeep<T>>
): T;

/**
Expand Down

0 comments on commit d8ab580

Please sign in to comment.