mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
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
This commit is contained in:
committed by
Mohamed Hegazy
parent
53d7a4b9eb
commit
3775dcfb3b
3
lodash/index.d.ts
vendored
3
lodash/index.d.ts
vendored
@@ -12701,7 +12701,7 @@ declare namespace _ {
|
||||
* @param value The value to check.
|
||||
* @returns Returns true if value is correctly classified, else false.
|
||||
*/
|
||||
isWeakMap<K, V>(value?: any): value is WeakMap<K, V>;
|
||||
isWeakMap<K, V>(value?: any): boolean;
|
||||
}
|
||||
|
||||
interface LoDashImplicitWrapperBase<T, TWrapper> {
|
||||
@@ -19446,5 +19446,4 @@ declare global {
|
||||
interface Set<T> { }
|
||||
interface Map<K, V> { }
|
||||
interface WeakSet<T> { }
|
||||
interface WeakMap<K, V> { }
|
||||
}
|
||||
|
||||
@@ -7435,17 +7435,6 @@ namespace TestIsUndefined {
|
||||
|
||||
// _.isWeakMap
|
||||
namespace TestIsWeakMap {
|
||||
{
|
||||
let value: number|WeakMap<string, number>;
|
||||
|
||||
if (_.isWeakMap<string, number>(value)) {
|
||||
let result: WeakMap<string, number> = value;
|
||||
}
|
||||
else {
|
||||
let result: number = value;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
let result: boolean;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user