Skip to content

Commit b069473

Browse files
authored
fix(closure-compiler): remove top level throws (#3518)
This fixes closure compiler issues, and also removes the only side-effect from these modules. We want our modules to be side-effect free. This was an oversight in that regard
1 parent e5a6070 commit b069473

File tree

2 files changed

+0
-9
lines changed

2 files changed

+0
-9
lines changed

src/internal/operators/distinct.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ import { InnerSubscriber } from '../InnerSubscriber';
66
import { subscribeToResult } from '../util/subscribeToResult';
77
import { MonoTypeOperatorFunction, TeardownLogic } from '../types';
88

9-
if (!Set) {
10-
throw new Error('Set is not present, please polyfill');
11-
}
12-
139
/**
1410
* Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from previous items.
1511
*

src/internal/operators/groupBy.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ import { Operator } from '../Operator';
55
import { Subject } from '../Subject';
66
import { OperatorFunction } from '../types';
77

8-
/** Assert that map is present for this operator */
9-
if (!Map) {
10-
throw new Error('Map not found, please polyfill');
11-
}
12-
138
/* tslint:disable:max-line-length */
149
export function groupBy<T, K>(keySelector: (value: T) => K): OperatorFunction<T, GroupedObservable<K, T>>;
1510
export function groupBy<T, K>(keySelector: (value: T) => K, elementSelector: void, durationSelector: (grouped: GroupedObservable<K, T>) => Observable<any>): OperatorFunction<T, GroupedObservable<K, T>>;

0 commit comments

Comments
 (0)