mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
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:
parent
d64ec0ed99
commit
d380ec4475
@ -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
|
||||
|
||||
4
types/clone-deep/index.d.ts
vendored
4
types/clone-deep/index.d.ts
vendored
@ -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;
|
||||
|
||||
@ -10,7 +10,6 @@
|
||||
"typeRoots": ["../"],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": ["index.d.ts", "clone-deep-tests.ts"]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user