From 3775dcfb3bb106e97ab5347c777880b769cd244c Mon Sep 17 00:00:00 2001 From: Budi Adiono Date: Sat, 25 Feb 2017 05:35:56 +0700 Subject: [PATCH] lodash - change weakmap declaration to work with TS 2.2 (#14662) * lodash - change weakmap declaration to work with TS 2.2 * remove WeakMap declaration altogether --- lodash/index.d.ts | 3 +-- lodash/lodash-tests.ts | 11 ----------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/lodash/index.d.ts b/lodash/index.d.ts index 00de563bbb..4671a672f3 100644 --- a/lodash/index.d.ts +++ b/lodash/index.d.ts @@ -12701,7 +12701,7 @@ declare namespace _ { * @param value The value to check. * @returns Returns true if value is correctly classified, else false. */ - isWeakMap(value?: any): value is WeakMap; + isWeakMap(value?: any): boolean; } interface LoDashImplicitWrapperBase { @@ -19446,5 +19446,4 @@ declare global { interface Set { } interface Map { } interface WeakSet { } - interface WeakMap { } } diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index a2adf6ff8c..8ccd742a0e 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -7435,17 +7435,6 @@ namespace TestIsUndefined { // _.isWeakMap namespace TestIsWeakMap { - { - let value: number|WeakMap; - - if (_.isWeakMap(value)) { - let result: WeakMap = value; - } - else { - let result: number = value; - } - } - { let result: boolean;