From 421678aeeaf2a4191e944df5dbc7e441a7ef1494 Mon Sep 17 00:00:00 2001 From: Georgios Valotasios Date: Sun, 17 Sep 2017 13:23:56 +0200 Subject: [PATCH] fix: do not make use of es6's Map and Set this should fix #16587 --- types/sinon/index.d.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/types/sinon/index.d.ts b/types/sinon/index.d.ts index f884f14b0a..d037362659 100644 --- a/types/sinon/index.d.ts +++ b/types/sinon/index.d.ts @@ -395,26 +395,34 @@ declare namespace Sinon { contains(expected: any[]): SinonMatcher; } + interface SimplifiedSet { + has(el: any): boolean; + } + + interface SimplifiedMap extends SimplifiedSet { + get(key: any): any; + } + interface SinonMapMatcher extends SinonMatcher { /** * Requires a Map to be deep equal another one. */ - deepEquals(expected: Map): SinonMatcher; + deepEquals(expected: SimplifiedMap): SinonMatcher; /** * Requires a Map to contain each one of the items the given map has. */ - contains(expected: Map): SinonMatcher; + contains(expected: SimplifiedMap): SinonMatcher; } interface SinonSetMatcher extends SinonMatcher { /** * Requires a Set to be deep equal another one. */ - deepEquals(expected: Set): SinonMatcher; + deepEquals(expected: SimplifiedSet): SinonMatcher; /** * Requires a Set to contain each one of the items the given set has. */ - contains(expected: Set): SinonMatcher; + contains(expected: SimplifiedSet): SinonMatcher; } interface SinonMatch {