From 966621c8d5c7ba469e6c3af2c658c44d2de5617b Mon Sep 17 00:00:00 2001 From: factiondavid <94008815+factiondavid@users.noreply.github.com> Date: Wed, 20 Dec 2023 11:18:14 -0600 Subject: [PATCH 1/2] Update UsageWithTypescript.md Include id type for Book entity --- docs/usage/UsageWithTypescript.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage/UsageWithTypescript.md b/docs/usage/UsageWithTypescript.md index 3984a89cff..54d09e3e6b 100644 --- a/docs/usage/UsageWithTypescript.md +++ b/docs/usage/UsageWithTypescript.md @@ -615,7 +615,7 @@ interface Book { } // highlight-next-line -const booksAdapter = createEntityAdapter({ +const booksAdapter = createEntityAdapter({ selectId: book => book.bookId, sortComparer: (a, b) => a.title.localeCompare(b.title) }) From 30b666871b3b3c5b8d520231e3a4e9e890891fda Mon Sep 17 00:00:00 2001 From: factiondavid <94008815+factiondavid@users.noreply.github.com> Date: Wed, 20 Dec 2023 12:45:07 -0600 Subject: [PATCH 2/2] Update docs/usage/UsageWithTypescript.md Co-authored-by: Ben Durrant --- docs/usage/UsageWithTypescript.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/usage/UsageWithTypescript.md b/docs/usage/UsageWithTypescript.md index 54d09e3e6b..81a89ab501 100644 --- a/docs/usage/UsageWithTypescript.md +++ b/docs/usage/UsageWithTypescript.md @@ -615,8 +615,8 @@ interface Book { } // highlight-next-line -const booksAdapter = createEntityAdapter({ - selectId: book => book.bookId, +const booksAdapter = createEntityAdapter({ + selectId: (book: Book) => book.bookId, sortComparer: (a, b) => a.title.localeCompare(b.title) })