From 92aa3b95fcdb5ed3d4dff25a320daf0cdae86456 Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Tue, 4 Jun 2024 15:03:29 +0100 Subject: [PATCH] add comment back --- docs/usage/UsageWithTypescript.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/usage/UsageWithTypescript.md b/docs/usage/UsageWithTypescript.md index 4639581866..dd8c719cda 100644 --- a/docs/usage/UsageWithTypescript.md +++ b/docs/usage/UsageWithTypescript.md @@ -652,7 +652,10 @@ const booksAdapter = createEntityAdapter({ const booksSlice = createSlice({ name: 'books', + // highlight-start + // The type of the state is inferred here initialState: booksAdapter.getInitialState(), + // highlight-end reducers: { bookAdded: booksAdapter.addOne, booksReceived(state, action: PayloadAction<{ books: Book[] }>) { @@ -679,7 +682,10 @@ const booksAdapter = createEntityAdapter({ const booksSlice = createSlice({ name: 'books', + // highlight-start + // The type of the state is inferred here initialState: booksAdapter.getInitialState(), + // highlight-end reducers: { bookAdded: booksAdapter.addOne, booksReceived(state, action: PayloadAction<{ books: Book[] }>) {