Skip to content

Commit 7c0de33

Browse files
committed
test: drop | END
END already matches AnyAction so doesn't need to be explicitly added.
1 parent 31fb3b9 commit 7c0de33

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import { RootSagaContext } from '../src/sagas';
1212

1313
export class AsyncSaga {
1414
private channel: MulticastChannel<AnyAction>;
15-
private dispatches: (AnyAction | END)[];
16-
private takers: { put: (action: AnyAction | END) => void }[];
15+
private dispatches: AnyAction[];
16+
private takers: { put: (action: AnyAction) => void }[];
1717
private state: RootState;
1818
private task: Task;
1919

@@ -51,7 +51,7 @@ export class AsyncSaga {
5151
// completed later
5252
return new Promise((resolve, reject) => {
5353
this.takers.push({
54-
put: (a: AnyAction | END): void => {
54+
put: (a: AnyAction): void => {
5555
if (a.type === END.type) {
5656
reject();
5757
} else {
@@ -85,7 +85,7 @@ export class AsyncSaga {
8585
}
8686
}
8787

88-
private dispatch(action: AnyAction | END): AnyAction | END {
88+
private dispatch(action: AnyAction): AnyAction {
8989
const taker = this.takers.shift();
9090
if (taker === undefined) {
9191
// if there are no takers waiting, the queue the action

0 commit comments

Comments
 (0)