Skip to content

Commit

Permalink
Update Selector types to be interfaces for correct extension
Browse files Browse the repository at this point in the history
  • Loading branch information
aikoven committed Mar 30, 2017
1 parent fb8dd53 commit 1d6b934
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
export as namespace Reselect;

export type Selector<S, R> = (state: S) => R;
export interface Selector<S, R> {
(state: S): R;
}
export interface OutputSelector<S, R, C> extends Selector<S, R> {
resultFunc: C;
recomputations: () => number;
resetRecomputations: () => number;
}

export type ParametricSelector<S, P, R> = (state: S, props: P, ...args: any[]) => R;
export interface ParametricSelector<S, P, R> {
(state: S, props: P, ...args: any[]): R;
}
export interface OutputParametricSelector<S, P, R, C> extends ParametricSelector<S, P, R> {
resultFunc: C;
recomputations: () => number;
Expand Down

0 comments on commit 1d6b934

Please sign in to comment.