diff --git a/src/action-common.ts b/src/action-common.ts index ca30b7438..dc76e9fdb 100644 --- a/src/action-common.ts +++ b/src/action-common.ts @@ -42,12 +42,12 @@ export interface FeatureState { /** Identifies a type of state an Action may have. */ export type StateFeature = keyof FeatureState; -/** Constructs the union of all state types identifies by `Fs`. */ +/** Constructs the intersection of all state types identifies by `Fs`. */ export type FieldsOf = Fs extends [] ? BaseState : Fs extends [ infer Head extends StateFeature, - ...infer Tail extends StateFeature[], + ...infer Tail extends readonly StateFeature[], ] ? FeatureState[Head] & FieldsOf : never;