Skip to content

Commit

Permalink
chore: add support for TypeScript 2.9 (#1173)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-okrushko authored and brandonroberts committed Jul 5, 2018
1 parent e7de882 commit a17cfee
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/store-devtools/src/reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ export function liftReducerWith(
skippedActionIds,
committedState,
currentStateIndex,
computedStates,
computedStates
} = liftedAction.nextLiftedState);
break;
}
Expand Down
4 changes: 3 additions & 1 deletion modules/store/src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,10 @@ export class Store<T> extends Observable<T> implements Observer<Action> {
this.reducerManager.addReducer(key, reducer);
}

// Once TS is >= 2.8 replace with <Key extends Extract<keyof T, string>>
removeReducer<Key extends keyof T>(key: Key) {
this.reducerManager.removeReducer(key);
// TS2.9: keyof T is string|number|symbol, explicitly cast to string to fix.
this.reducerManager.removeReducer(key as string);
}
}

Expand Down
2 changes: 1 addition & 1 deletion prettier.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
singleQuote: true,
trailingComma: 'es5',
trailingComma: 'none',
};

0 comments on commit a17cfee

Please sign in to comment.