Skip to content

Commit

Permalink
Descriptive generic param name
Browse files Browse the repository at this point in the history
  • Loading branch information
MajorLift committed May 29, 2024
1 parent e36ab32 commit 25f2f0b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/composable-controller/src/ComposableController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,13 @@ export type ComposableControllerMessenger<

type GetChildControllers<
ComposableControllerState,
P extends keyof ComposableControllerState = keyof ComposableControllerState,
> = P extends string
? ComposableControllerState[P] extends StateConstraint
? { name: P; state: ComposableControllerState[P] }
ControllerName extends keyof ComposableControllerState = keyof ComposableControllerState,
> = ControllerName extends string
? ComposableControllerState[ControllerName] extends StateConstraint
? { name: ControllerName; state: ComposableControllerState[ControllerName] }
: BaseControllerV1<
BaseConfig & Record<string, unknown>,
BaseState & ComposableControllerState[P]
BaseState & ComposableControllerState[ControllerName]
>
: never;

Expand Down

0 comments on commit 25f2f0b

Please sign in to comment.