From 0570deffa2d026e56a6e62e9b49407aacbead399 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 1 Oct 2020 10:01:13 -0600 Subject: [PATCH] Fix iterableUnion types --- src/stores/widgets/StopGapWidgetDriver.ts | 2 +- src/utils/iterables.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/stores/widgets/StopGapWidgetDriver.ts b/src/stores/widgets/StopGapWidgetDriver.ts index 84626e74fb..b54e4a5f7d 100644 --- a/src/stores/widgets/StopGapWidgetDriver.ts +++ b/src/stores/widgets/StopGapWidgetDriver.ts @@ -25,6 +25,6 @@ export class StopGapWidgetDriver extends WidgetDriver { } public async validateCapabilities(requested: Set): Promise> { - return iterableUnion(requested, new Set(this.allowedCapabilities)); + return new Set(iterableUnion(requested, this.allowedCapabilities)); } } diff --git a/src/utils/iterables.ts b/src/utils/iterables.ts index 3d2585906d..56e0bca1b7 100644 --- a/src/utils/iterables.ts +++ b/src/utils/iterables.ts @@ -16,6 +16,6 @@ import { arrayUnion } from "./arrays"; -export function iterableUnion, T>(a: C, b: C): Set { - return new Set(arrayUnion(Array.from(a), Array.from(b))); +export function iterableUnion(a: Iterable, b: Iterable): Iterable { + return arrayUnion(Array.from(a), Array.from(b)); }