File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -53,16 +53,17 @@ declare const $CombinedState: unique symbol
53
53
* typed as always undefined, so its never expected to have a meaningful
54
54
* value anyway. It just makes this type distinquishable from plain `{}`.
55
55
*/
56
- export type CombinedState < S > = { readonly [ $CombinedState ] ?: undefined } & S
56
+ interface EmptyObject {
57
+ readonly [ $CombinedState ] ?: undefined
58
+ }
59
+ export type CombinedState < S > = EmptyObject & S
57
60
58
61
/**
59
62
* Recursively makes combined state objects partial. Only combined state _root
60
63
* objects_ (i.e. the generated higher level object with keys mapping to
61
64
* individual reducers) are partial.
62
65
*/
63
- export type PreloadedState < S > = Required < S > extends {
64
- [ $CombinedState ] : undefined
65
- }
66
+ export type PreloadedState < S > = Required < S > extends EmptyObject
66
67
? S extends CombinedState < infer S1 >
67
68
? {
68
69
[ K in keyof S1 ] ?: S1 [ K ] extends object ? PreloadedState < S1 [ K ] > : S1 [ K ]
You can’t perform that action at this time.
0 commit comments