Skip to content

Commit

Permalink
fix(closure-compiler): remove top level throws (#3518)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
benlesh authored Apr 5, 2018
1 parent e5a6070 commit b069473
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
4 changes: 0 additions & 4 deletions src/internal/operators/distinct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ import { InnerSubscriber } from '../InnerSubscriber';
import { subscribeToResult } from '../util/subscribeToResult';
import { MonoTypeOperatorFunction, TeardownLogic } from '../types';

if (!Set) {
throw new Error('Set is not present, please polyfill');
}

/**
* Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from previous items.
*
Expand Down
5 changes: 0 additions & 5 deletions src/internal/operators/groupBy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ import { Operator } from '../Operator';
import { Subject } from '../Subject';
import { OperatorFunction } from '../types';

/** Assert that map is present for this operator */
if (!Map) {
throw new Error('Map not found, please polyfill');
}

/* tslint:disable:max-line-length */
export function groupBy<T, K>(keySelector: (value: T) => K): OperatorFunction<T, GroupedObservable<K, T>>;
export function groupBy<T, K>(keySelector: (value: T) => K, elementSelector: void, durationSelector: (grouped: GroupedObservable<K, T>) => Observable<any>): OperatorFunction<T, GroupedObservable<K, T>>;
Expand Down

0 comments on commit b069473

Please sign in to comment.