Skip to content

Commit 92aa3b9

Browse files
committed
add comment back
1 parent 6dc9363 commit 92aa3b9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/usage/UsageWithTypescript.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,10 @@ const booksAdapter = createEntityAdapter<Book>({
652652

653653
const booksSlice = createSlice({
654654
name: 'books',
655+
// highlight-start
656+
// The type of the state is inferred here
655657
initialState: booksAdapter.getInitialState(),
658+
// highlight-end
656659
reducers: {
657660
bookAdded: booksAdapter.addOne,
658661
booksReceived(state, action: PayloadAction<{ books: Book[] }>) {
@@ -679,7 +682,10 @@ const booksAdapter = createEntityAdapter({
679682

680683
const booksSlice = createSlice({
681684
name: 'books',
685+
// highlight-start
686+
// The type of the state is inferred here
682687
initialState: booksAdapter.getInitialState(),
688+
// highlight-end
683689
reducers: {
684690
bookAdded: booksAdapter.addOne,
685691
booksReceived(state, action: PayloadAction<{ books: Book[] }>) {

0 commit comments

Comments
 (0)