From 102887f1585d0ecc0fb5d0c2bab5afbce5b17f11 Mon Sep 17 00:00:00 2001 From: Ben Durrant Date: Sun, 26 Mar 2023 19:09:34 +0100 Subject: [PATCH] remove "alternative" from descriptions of builder callback (#3296) --- packages/toolkit/src/createSlice.ts | 3 --- packages/toolkit/src/tests/createReducer.test.ts | 2 +- packages/toolkit/src/tests/createReducer.typetest.ts | 2 +- packages/toolkit/src/tests/createSlice.test.ts | 2 +- packages/toolkit/src/tests/createSlice.typetest.ts | 2 +- packages/toolkit/src/tests/mapBuilders.typetest.ts | 2 +- 6 files changed, 5 insertions(+), 8 deletions(-) diff --git a/packages/toolkit/src/createSlice.ts b/packages/toolkit/src/createSlice.ts index b9d3fd0d0f..48b36f39e7 100644 --- a/packages/toolkit/src/createSlice.ts +++ b/packages/toolkit/src/createSlice.ts @@ -100,9 +100,6 @@ export interface CreateSliceOptions< * A callback that receives a *builder* object to define * case reducers via calls to `builder.addCase(actionCreatorOrType, reducer)`. * - * Alternatively, a mapping from action types to action-type-specific *case reducer* - * functions. These reducers should have existing action types used - * as the keys, and action creators will _not_ be generated. * * @example ```ts diff --git a/packages/toolkit/src/tests/createReducer.test.ts b/packages/toolkit/src/tests/createReducer.test.ts index 243cecf943..ee845e3b3a 100644 --- a/packages/toolkit/src/tests/createReducer.test.ts +++ b/packages/toolkit/src/tests/createReducer.test.ts @@ -254,7 +254,7 @@ describe('createReducer', () => { behavesLikeReducer(wrappedReducer) }) - describe('alternative builder callback for actionMap', () => { + describe('builder callback for actionMap', () => { const increment = createAction('increment') const decrement = createAction('decrement') diff --git a/packages/toolkit/src/tests/createReducer.typetest.ts b/packages/toolkit/src/tests/createReducer.typetest.ts index bcfb885025..4fe5c2a62f 100644 --- a/packages/toolkit/src/tests/createReducer.typetest.ts +++ b/packages/toolkit/src/tests/createReducer.typetest.ts @@ -70,7 +70,7 @@ import { expectType } from './helpers' }) } -/** Test: alternative builder callback for actionMap */ +/** Test: builder callback for actionMap */ { const increment = createAction('increment') diff --git a/packages/toolkit/src/tests/createSlice.test.ts b/packages/toolkit/src/tests/createSlice.test.ts index 38038dbefc..9fd8e23381 100644 --- a/packages/toolkit/src/tests/createSlice.test.ts +++ b/packages/toolkit/src/tests/createSlice.test.ts @@ -200,7 +200,7 @@ describe('createSlice', () => { expect(result).toBe(15) }) - describe('alternative builder callback for extraReducers', () => { + describe('builder callback for extraReducers', () => { const increment = createAction('increment') test('can be used with actionCreators', () => { diff --git a/packages/toolkit/src/tests/createSlice.typetest.ts b/packages/toolkit/src/tests/createSlice.typetest.ts index 64c33078c5..df1ce4f672 100644 --- a/packages/toolkit/src/tests/createSlice.typetest.ts +++ b/packages/toolkit/src/tests/createSlice.typetest.ts @@ -398,7 +398,7 @@ const value = actionCreators.anyKey } } -/** Test: alternative builder callback for extraReducers */ +/** Test: builder callback for extraReducers */ { createSlice({ name: 'test', diff --git a/packages/toolkit/src/tests/mapBuilders.typetest.ts b/packages/toolkit/src/tests/mapBuilders.typetest.ts index ae930f157a..42bfdd5a05 100644 --- a/packages/toolkit/src/tests/mapBuilders.typetest.ts +++ b/packages/toolkit/src/tests/mapBuilders.typetest.ts @@ -5,7 +5,7 @@ import type { AnyAction } from '@reduxjs/toolkit' import { createAction } from '@reduxjs/toolkit' import { expectExactType, expectType } from './helpers' -/** Test: alternative builder callback for actionMap */ +/** Test: builder callback for actionMap */ { const increment = createAction('increment') const decrement = createAction('decrement')