From ff1e327b958fc640f797d2e5c334f64396603427 Mon Sep 17 00:00:00 2001 From: Tim Dorr Date: Tue, 23 Apr 2019 09:55:36 -0400 Subject: [PATCH] Fix formatting issues. --- docs/basics/ExampleTodoList.md | 5 +++-- docs/introduction/CoreConcepts.md | 9 +++++---- index.d.ts | 6 +++--- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/docs/basics/ExampleTodoList.md b/docs/basics/ExampleTodoList.md index 72c1202d23c..a0b5bf2788e 100644 --- a/docs/basics/ExampleTodoList.md +++ b/docs/basics/ExampleTodoList.md @@ -77,8 +77,9 @@ const todos = (state = [], action) => { } ] case 'TOGGLE_TODO': - return state.map(todo => - todo.id === action.id ? { ...todo, completed: !todo.completed } : todo + return state.map( + todo => + todo.id === action.id ? { ...todo, completed: !todo.completed } : todo ) default: return state diff --git a/docs/introduction/CoreConcepts.md b/docs/introduction/CoreConcepts.md index 95d288c2e76..7fa8ec2c817 100644 --- a/docs/introduction/CoreConcepts.md +++ b/docs/introduction/CoreConcepts.md @@ -50,10 +50,11 @@ function todos(state = [], action) { case 'ADD_TODO': return state.concat([{ text: action.text, completed: false }]) case 'TOGGLE_TODO': - return state.map((todo, index) => - action.index === index - ? { text: todo.text, completed: !todo.completed } - : todo + return state.map( + (todo, index) => + action.index === index + ? { text: todo.text, completed: !todo.completed } + : todo ) default: return state diff --git a/index.d.ts b/index.d.ts index 114330e29e3..1cf5a704337 100644 --- a/index.d.ts +++ b/index.d.ts @@ -94,9 +94,9 @@ export function combineReducers>( reducers: T ): Reducer, InferActionTypes>> -type InferActionTypes = R extends Reducer ? A : AnyAction; -type InferReducerTypes = T extends Record ? R : Reducer; -type InferStateType = T extends ReducersMapObject ? S : never; +type InferActionTypes = R extends Reducer ? A : AnyAction +type InferReducerTypes = T extends Record ? R : Reducer +type InferStateType = T extends ReducersMapObject ? S : never /* store */