Remove deepmerge: no longer needed (#29415)

This commit is contained in:
Josh Duff
2018-10-08 16:34:27 -05:00
committed by Andy
parent 0979551474
commit c77754a345
5 changed files with 6 additions and 82 deletions

View File

@@ -396,6 +396,12 @@
"sourceRepoURL": "https://github.com/MikeMcl/decimal.js",
"asOfVersion": "7.4.0"
},
{
"libraryName": "deepmerge",
"typingsPackageName": "deepmerge",
"sourceRepoURL": "git@github.com:KyleAMathews/deepmerge.git",
"asOfVersion": "2.2.0"
},
{
"libraryName": "delay",
"typingsPackageName": "delay",

View File

@@ -1,29 +0,0 @@
import * as deepmerge from "deepmerge";
const x = {
foo: { bar: 3 },
array: [{ does: 'work', too: [1, 2, 3] }]
};
const y = {
foo: { baz: 4 },
quux: 5,
array: [{ does: 'work', too: [4, 5, 6] }, { really: 'yes' }]
};
const expected = {
foo: { bar: 3, baz: 4 },
array: [{ does: 'work', too: [1, 2, 3, 4, 5, 6] }, { really: 'yes' }],
quux: 5
};
const result = deepmerge(x, y);
const anyResult = deepmerge<any>(x, y);
function reverseConcat(dest: number[], src: number[]) {
return src.concat(dest);
}
const withOptions = deepmerge(x, y, {
clone: false,
arrayMerge: reverseConcat
});

View File

@@ -1,29 +0,0 @@
// Type definitions for deepmerge 2.1
// Project: https://github.com/KyleAMathews/deepmerge
// Definitions by: marvinscharle <https://github.com/marvinscharle>
// syy1125 <https://github.com/syy1125>
// AppLover69 <https://github.com/AppLover69>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
export = deepmerge;
declare function deepmerge<T>(x: Partial<T>, y: Partial<T>, options?: deepmerge.Options): T;
declare function deepmerge<T1, T2>(x: T1, y: T2, options?: deepmerge.Options): T1 & T2;
declare namespace deepmerge {
interface Options {
clone?: boolean;
arrayMerge?(destination: any[], source: any[], options?: Options): any[];
isMergeableObject?(value: object): boolean;
}
function all<T>(objects: Array<Partial<T>>, options?: Options): T;
}
declare global {
interface Window {
deepmerge<T>(x: Partial<T>, y: Partial<T>, options?: deepmerge.Options): T;
deepmerge<T1, T2>(x: T1, y: T2, options?: deepmerge.Options): T1 & T2;
}
}

View File

@@ -1,23 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"deepmerge-tests.ts"
]
}

View File

@@ -1 +0,0 @@
{ "extends": "dtslint/dt.json" }