diff --git a/modules/store/src/selector.ts b/modules/store/src/selector.ts index 674d15f242..00c34f84c9 100644 --- a/modules/store/src/selector.ts +++ b/modules/store/src/selector.ts @@ -139,9 +139,3 @@ export function createFeatureSelector( return Object.assign(memoized, { release: reset }); } - -export function isSelector(v: any): v is MemoizedSelector { - return ( - typeof v === 'function' && v.release && typeof v.release === 'function' - ); -} diff --git a/modules/store/src/store.ts b/modules/store/src/store.ts index b509612712..c7314198e8 100644 --- a/modules/store/src/store.ts +++ b/modules/store/src/store.ts @@ -9,7 +9,6 @@ import { Action, ActionReducer } from './models'; import { ActionsSubject } from './actions_subject'; import { StateObservable } from './state'; import { ReducerManager } from './reducer_manager'; -import { isSelector, createSelector } from './selector'; @Injectable() export class Store extends Observable implements Observer { @@ -70,10 +69,8 @@ export class Store extends Observable implements Observer { if (typeof pathOrMapFn === 'string') { mapped$ = pluck.call(this, pathOrMapFn, ...paths); - } else if (typeof pathOrMapFn === 'function' && isSelector(pathOrMapFn)) { - mapped$ = map.call(this, pathOrMapFn); } else if (typeof pathOrMapFn === 'function') { - mapped$ = map.call(this, createSelector(s => s, pathOrMapFn)); + mapped$ = map.call(this, pathOrMapFn); } else { throw new TypeError( `Unexpected type '${typeof pathOrMapFn}' in select operator,` +