Skip to content

Commit

Permalink
Remove unnecessary or inaccurate generic arguments for reduce
Browse files Browse the repository at this point in the history
  • Loading branch information
MajorLift committed Feb 27, 2024
1 parent aa7ee9c commit 6ef730e
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions packages/composable-controller/src/ComposableController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export class ComposableController extends BaseController<

super({
name: controllerName,
metadata: controllers.reduce<StateMetadata<ComposableControllerState>>(
metadata: controllers.reduce(
(metadata, controller) => ({
...metadata,
[controller.name]: isBaseController(controller)
Expand All @@ -167,12 +167,9 @@ export class ComposableController extends BaseController<
}),
{},
),
state: controllers.reduce<ComposableControllerState>(
(state, controller) => {
return { ...state, [controller.name]: controller.state };
},
{},
),
state: controllers.reduce((state, controller) => {
return { ...state, [controller.name]: controller.state };
}, {}),
messenger,
});

Expand Down

0 comments on commit 6ef730e

Please sign in to comment.