Skip to content

Commit d309c0e

Browse files
committed
Improve FieldsOf
1 parent e34d7fe commit d309c0e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/action-common.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ export interface FeatureState {
4242
/** Identifies a type of state an Action may have. */
4343
export type StateFeature = keyof FeatureState;
4444

45-
/** Constructs the union of all state types identifies by `Fs`. */
45+
/** Constructs the intersection of all state types identifies by `Fs`. */
4646
export type FieldsOf<Fs extends readonly StateFeature[]> = Fs extends []
4747
? BaseState
4848
: Fs extends [
4949
infer Head extends StateFeature,
50-
...infer Tail extends StateFeature[],
50+
...infer Tail extends readonly StateFeature[],
5151
]
5252
? FeatureState[Head] & FieldsOf<Tail>
5353
: never;

0 commit comments

Comments
 (0)