Skip to content

Commit

Permalink
remove "alternative" from descriptions of builder callback (#3296)
Browse files Browse the repository at this point in the history
  • Loading branch information
EskiMojo14 authored Mar 26, 2023
1 parent 157536c commit 102887f
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 8 deletions.
3 changes: 0 additions & 3 deletions packages/toolkit/src/createSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/toolkit/src/tests/createReducer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ describe('createReducer', () => {
behavesLikeReducer(wrappedReducer)
})

describe('alternative builder callback for actionMap', () => {
describe('builder callback for actionMap', () => {
const increment = createAction<number, 'increment'>('increment')
const decrement = createAction<number, 'decrement'>('decrement')

Expand Down
2 changes: 1 addition & 1 deletion packages/toolkit/src/tests/createReducer.typetest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ import { expectType } from './helpers'
})
}

/** Test: alternative builder callback for actionMap */
/** Test: builder callback for actionMap */
{
const increment = createAction<number, 'increment'>('increment')

Expand Down
2 changes: 1 addition & 1 deletion packages/toolkit/src/tests/createSlice.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ describe('createSlice', () => {
expect(result).toBe(15)
})

describe('alternative builder callback for extraReducers', () => {
describe('builder callback for extraReducers', () => {
const increment = createAction<number, 'increment'>('increment')

test('can be used with actionCreators', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/toolkit/src/tests/createSlice.typetest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ const value = actionCreators.anyKey
}
}

/** Test: alternative builder callback for extraReducers */
/** Test: builder callback for extraReducers */
{
createSlice({
name: 'test',
Expand Down
2 changes: 1 addition & 1 deletion packages/toolkit/src/tests/mapBuilders.typetest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<number, 'increment'>('increment')
const decrement = createAction<number, 'decrement'>('decrement')
Expand Down

0 comments on commit 102887f

Please sign in to comment.