We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
FieldsOf
1 parent e34d7fe commit d309c0eCopy full SHA for d309c0e
1 file changed
src/action-common.ts
@@ -42,12 +42,12 @@ export interface FeatureState {
42
/** Identifies a type of state an Action may have. */
43
export type StateFeature = keyof FeatureState;
44
45
-/** Constructs the union of all state types identifies by `Fs`. */
+/** Constructs the intersection of all state types identifies by `Fs`. */
46
export type FieldsOf<Fs extends readonly StateFeature[]> = Fs extends []
47
? BaseState
48
: Fs extends [
49
infer Head extends StateFeature,
50
- ...infer Tail extends StateFeature[],
+ ...infer Tail extends readonly StateFeature[],
51
]
52
? FeatureState[Head] & FieldsOf<Tail>
53
: never;
0 commit comments