Skip to content

Commit

Permalink
Fixed typings
Browse files Browse the repository at this point in the history
This does not compile

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

interfaces cannot extend types.

https://github.com/reactjs/reselect/blob/master/src/index.d.ts#L3-L8
  • Loading branch information
rikkertkoppes authored Apr 12, 2017
1 parent 5eea93a commit 4d8aa77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
export as namespace Reselect;

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

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

0 comments on commit 4d8aa77

Please sign in to comment.