Fix incorrect typings for clone-deep (#33990)

* Fix incorrect typings for clone-deep

* Update tsconfig.json to remove the insidious setting that caused the mistake to be overlooked ;-)
This commit is contained in:
Pete Gonzalez 2019-03-18 18:35:55 -07:00 committed by Wesley Wigham
parent d64ec0ed99
commit d380ec4475
3 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,4 @@
import cloneDeep from 'clone-deep';
import cloneDeep = require('clone-deep');
cloneDeep<object>(Object.create(null)); // $ExpectType object
cloneDeep<object>({}); // $ExpectType object

View File

@ -4,7 +4,9 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.7
export default function cloneDeep<T>(
declare function cloneDeep<T>(
val: T,
instanceClone?: true | ((val: T) => T)
): T;
export = cloneDeep;

View File

@ -10,7 +10,6 @@
"typeRoots": ["../"],
"types": [],
"noEmit": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true
},
"files": ["index.d.ts", "clone-deep-tests.ts"]