From b74cdd2c71696b950540448a2ea70b180bfb5186 Mon Sep 17 00:00:00 2001 From: Alexander Rose <alex.rose@rcsb.org> Date: Tue, 26 Jun 2018 20:17:10 -0700 Subject: [PATCH] added missing return types for set utils --- src/mol-util/set.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mol-util/set.ts b/src/mol-util/set.ts index 555b13d7a..cf9734018 100644 --- a/src/mol-util/set.ts +++ b/src/mol-util/set.ts @@ -15,14 +15,14 @@ export function isSuperset<T>(setA: Set<T>, setB: Set<T>) { } /** Create set containing elements of both set a and set b. */ -export function union<T>(setA: Set<T>, setB: Set<T>) { +export function union<T>(setA: Set<T>, setB: Set<T>): Set<T> { const union = new Set(setA); for (const elem of Array.from(setB)) union.add(elem); return union; } /** Create set containing elements of set a that are also in set b. */ -export function intersection<T>(setA: Set<T>, setB: Set<T>) { +export function intersection<T>(setA: Set<T>, setB: Set<T>): Set<T> { const intersection = new Set(); for (const elem of Array.from(setB)) { if (setA.has(elem)) intersection.add(elem); @@ -31,7 +31,7 @@ export function intersection<T>(setA: Set<T>, setB: Set<T>) { } /** Create set containing elements of set a that are not in set b. */ -export function difference<T>(setA: Set<T>, setB: Set<T>) { +export function difference<T>(setA: Set<T>, setB: Set<T>): Set<T> { const difference = new Set(setA); for (const elem of Array.from(setB)) difference.delete(elem); return difference; -- GitLab