Skip to content

Commit

Permalink
Docs: fix invalid typescript expression (reduxjs#917)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbelsky authored Mar 9, 2021
1 parent 0f8ac79 commit 87bc203
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/usage/usage-with-typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ The standard approach is to declare an interface or type for your state, create
type SliceState = { state: 'loading' } | { state: 'finished'; data: string }

// First approach: define the initial state using that type
const initialState = { state: 'loading' }: SliceState
const initialState: SliceState = { state: 'loading' }

createSlice({
name: 'test1',
Expand Down

0 comments on commit 87bc203

Please sign in to comment.