Commit 31ac4c8
committed
Determine type of sidebar store automatically
Avoid the need to manually create the `SidebarStore` type by inferring
it automatically. This works as follows:
1. The `modules` argument to `createStore` has been converted to a
tuple type (`[ModuleA, ModuleB, ...]`)
2. The type of a module that would result from merging all the
individual modules (`ModuleA & ModuleB ...`) is computed
using a `TupleToIntersection` utility type
3. `StoreFromModule` is used to compute the type of the store that the
merged module would produce1 parent 1326d1a commit 31ac4c8
2 files changed
Lines changed: 28 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
152 | 170 | | |
153 | 171 | | |
154 | 172 | | |
| |||
173 | 191 | | |
174 | 192 | | |
175 | 193 | | |
176 | | - | |
| 194 | + | |
| 195 | + | |
177 | 196 | | |
178 | 197 | | |
179 | | - | |
| 198 | + | |
180 | 199 | | |
181 | 200 | | |
182 | 201 | | |
| |||
241 | 260 | | |
242 | 261 | | |
243 | 262 | | |
244 | | - | |
| 263 | + | |
245 | 264 | | |
246 | 265 | | |
247 | 266 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 20 | + | |
44 | 21 | | |
45 | 22 | | |
46 | 23 | | |
| |||
52 | 29 | | |
53 | 30 | | |
54 | 31 | | |
55 | | - | |
56 | 32 | | |
57 | 33 | | |
58 | 34 | | |
59 | 35 | | |
60 | 36 | | |
61 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
62 | 40 | | |
63 | 41 | | |
64 | 42 | | |
| |||
75 | 53 | | |
76 | 54 | | |
77 | 55 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
| 56 | + | |
| 57 | + | |
82 | 58 | | |
0 commit comments