solid-js 1.8.21 → 1.8.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/dev.cjs +6 -4
- package/dist/dev.js +325 -564
- package/dist/server.js +74 -168
- package/dist/solid.cjs +6 -4
- package/dist/solid.js +283 -491
- package/h/dist/h.cjs +1 -1
- package/h/dist/h.js +9 -38
- package/h/jsx-runtime/dist/jsx.js +1 -1
- package/h/jsx-runtime/types/index.d.ts +8 -11
- package/h/jsx-runtime/types/jsx.d.ts +2 -0
- package/h/types/hyperscript.d.ts +11 -11
- package/html/dist/html.js +94 -216
- package/html/types/lit.d.ts +33 -47
- package/package.json +1 -1
- package/store/dist/dev.js +43 -122
- package/store/dist/server.js +8 -19
- package/store/dist/store.js +40 -113
- package/store/types/index.d.ts +7 -21
- package/store/types/modifiers.d.ts +3 -6
- package/store/types/mutable.d.ts +2 -5
- package/store/types/server.d.ts +4 -12
- package/store/types/store.d.ts +61 -218
- package/types/index.d.ts +10 -75
- package/types/jsx.d.ts +8 -18
- package/types/reactive/array.d.ts +4 -12
- package/types/reactive/observable.d.ts +17 -25
- package/types/reactive/scheduler.d.ts +6 -9
- package/types/reactive/signal.d.ts +142 -233
- package/types/render/Suspense.d.ts +5 -5
- package/types/render/component.d.ts +33 -64
- package/types/render/flow.d.ts +31 -43
- package/types/render/hydration.d.ts +15 -15
- package/types/server/index.d.ts +2 -57
- package/types/server/reactive.d.ts +42 -73
- package/types/server/rendering.d.ts +98 -169
- package/universal/dist/dev.js +12 -28
- package/universal/dist/universal.js +12 -28
- package/universal/types/index.d.ts +1 -3
- package/universal/types/universal.d.ts +1 -0
- package/web/dist/dev.js +83 -625
- package/web/dist/server.js +96 -210
- package/web/dist/web.js +81 -616
- package/web/storage/dist/storage.js +3 -3
- package/web/types/client.d.ts +2 -2
- package/web/types/core.d.ts +1 -10
- package/web/types/index.d.ts +10 -27
- package/web/types/server-mock.d.ts +32 -47
package/store/dist/store.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $PROXY, $TRACK, getListener, batch, createSignal } from
|
|
1
|
+
import { $PROXY, $TRACK, getListener, batch, createSignal } from 'solid-js';
|
|
2
2
|
|
|
3
3
|
const $RAW = Symbol("store-raw"),
|
|
4
4
|
$NODE = Symbol("store-node"),
|
|
@@ -8,7 +8,7 @@ function wrap$1(value) {
|
|
|
8
8
|
let p = value[$PROXY];
|
|
9
9
|
if (!p) {
|
|
10
10
|
Object.defineProperty(value, $PROXY, {
|
|
11
|
-
value:
|
|
11
|
+
value: p = new Proxy(value, proxyTraps$1)
|
|
12
12
|
});
|
|
13
13
|
if (!Array.isArray(value)) {
|
|
14
14
|
const keys = Object.keys(value),
|
|
@@ -28,29 +28,20 @@ function wrap$1(value) {
|
|
|
28
28
|
}
|
|
29
29
|
function isWrappable(obj) {
|
|
30
30
|
let proto;
|
|
31
|
-
return (
|
|
32
|
-
obj != null &&
|
|
33
|
-
typeof obj === "object" &&
|
|
34
|
-
(obj[$PROXY] ||
|
|
35
|
-
!(proto = Object.getPrototypeOf(obj)) ||
|
|
36
|
-
proto === Object.prototype ||
|
|
37
|
-
Array.isArray(obj))
|
|
38
|
-
);
|
|
31
|
+
return obj != null && typeof obj === "object" && (obj[$PROXY] || !(proto = Object.getPrototypeOf(obj)) || proto === Object.prototype || Array.isArray(obj));
|
|
39
32
|
}
|
|
40
33
|
function unwrap(item, set = new Set()) {
|
|
41
34
|
let result, unwrapped, v, prop;
|
|
42
|
-
if (
|
|
35
|
+
if (result = item != null && item[$RAW]) return result;
|
|
43
36
|
if (!isWrappable(item) || set.has(item)) return item;
|
|
44
37
|
if (Array.isArray(item)) {
|
|
45
|
-
if (Object.isFrozen(item)) item = item.slice(0);
|
|
46
|
-
else set.add(item);
|
|
38
|
+
if (Object.isFrozen(item)) item = item.slice(0);else set.add(item);
|
|
47
39
|
for (let i = 0, l = item.length; i < l; i++) {
|
|
48
40
|
v = item[i];
|
|
49
41
|
if ((unwrapped = unwrap(v, set)) !== v) item[i] = unwrapped;
|
|
50
42
|
}
|
|
51
43
|
} else {
|
|
52
|
-
if (Object.isFrozen(item)) item = Object.assign({}, item);
|
|
53
|
-
else set.add(item);
|
|
44
|
+
if (Object.isFrozen(item)) item = Object.assign({}, item);else set.add(item);
|
|
54
45
|
const keys = Object.keys(item),
|
|
55
46
|
desc = Object.getOwnPropertyDescriptors(item);
|
|
56
47
|
for (let i = 0, l = keys.length; i < l; i++) {
|
|
@@ -64,10 +55,9 @@ function unwrap(item, set = new Set()) {
|
|
|
64
55
|
}
|
|
65
56
|
function getNodes(target, symbol) {
|
|
66
57
|
let nodes = target[symbol];
|
|
67
|
-
if (!nodes)
|
|
68
|
-
Object.
|
|
69
|
-
|
|
70
|
-
});
|
|
58
|
+
if (!nodes) Object.defineProperty(target, symbol, {
|
|
59
|
+
value: nodes = Object.create(null)
|
|
60
|
+
});
|
|
71
61
|
return nodes;
|
|
72
62
|
}
|
|
73
63
|
function getNode(nodes, property, value) {
|
|
@@ -77,12 +67,11 @@ function getNode(nodes, property, value) {
|
|
|
77
67
|
internal: true
|
|
78
68
|
});
|
|
79
69
|
s.$ = set;
|
|
80
|
-
return
|
|
70
|
+
return nodes[property] = s;
|
|
81
71
|
}
|
|
82
72
|
function proxyDescriptor$1(target, property) {
|
|
83
73
|
const desc = Reflect.getOwnPropertyDescriptor(target, property);
|
|
84
|
-
if (!desc || desc.get || !desc.configurable || property === $PROXY || property === $NODE)
|
|
85
|
-
return desc;
|
|
74
|
+
if (!desc || desc.get || !desc.configurable || property === $PROXY || property === $NODE) return desc;
|
|
86
75
|
delete desc.value;
|
|
87
76
|
delete desc.writable;
|
|
88
77
|
desc.get = () => target[$PROXY][property];
|
|
@@ -109,25 +98,12 @@ const proxyTraps$1 = {
|
|
|
109
98
|
if (property === $NODE || property === $HAS || property === "__proto__") return value;
|
|
110
99
|
if (!tracked) {
|
|
111
100
|
const desc = Object.getOwnPropertyDescriptor(target, property);
|
|
112
|
-
if (
|
|
113
|
-
getListener() &&
|
|
114
|
-
(typeof value !== "function" || target.hasOwnProperty(property)) &&
|
|
115
|
-
!(desc && desc.get)
|
|
116
|
-
)
|
|
117
|
-
value = getNode(nodes, property, value)();
|
|
101
|
+
if (getListener() && (typeof value !== "function" || target.hasOwnProperty(property)) && !(desc && desc.get)) value = getNode(nodes, property, value)();
|
|
118
102
|
}
|
|
119
103
|
return isWrappable(value) ? wrap$1(value) : value;
|
|
120
104
|
},
|
|
121
105
|
has(target, property) {
|
|
122
|
-
if (
|
|
123
|
-
property === $RAW ||
|
|
124
|
-
property === $PROXY ||
|
|
125
|
-
property === $TRACK ||
|
|
126
|
-
property === $NODE ||
|
|
127
|
-
property === $HAS ||
|
|
128
|
-
property === "__proto__"
|
|
129
|
-
)
|
|
130
|
-
return true;
|
|
106
|
+
if (property === $RAW || property === $PROXY || property === $TRACK || property === $NODE || property === $HAS || property === "__proto__") return true;
|
|
131
107
|
getListener() && getNode(getNodes(target, $HAS), property)();
|
|
132
108
|
return property in target;
|
|
133
109
|
},
|
|
@@ -153,7 +129,7 @@ function setProperty(state, property, value, deleting = false) {
|
|
|
153
129
|
}
|
|
154
130
|
let nodes = getNodes(state, $NODE),
|
|
155
131
|
node;
|
|
156
|
-
if (
|
|
132
|
+
if (node = getNode(nodes, property, prev)) node.$(() => value);
|
|
157
133
|
if (Array.isArray(state) && state.length !== len) {
|
|
158
134
|
for (let i = state.length; i < len; i++) (node = nodes[i]) && node.$();
|
|
159
135
|
(node = getNode(nodes, "length", len)) && node.$(state.length);
|
|
@@ -199,7 +175,11 @@ function updatePath(current, path, traversed = []) {
|
|
|
199
175
|
}
|
|
200
176
|
return;
|
|
201
177
|
} else if (isArray && partType === "object") {
|
|
202
|
-
const {
|
|
178
|
+
const {
|
|
179
|
+
from = 0,
|
|
180
|
+
to = current.length - 1,
|
|
181
|
+
by = 1
|
|
182
|
+
} = part;
|
|
203
183
|
for (let i = from; i <= to; i += by) {
|
|
204
184
|
updatePath(current, [i].concat(path), traversed);
|
|
205
185
|
}
|
|
@@ -218,7 +198,7 @@ function updatePath(current, path, traversed = []) {
|
|
|
218
198
|
}
|
|
219
199
|
if (part === undefined && value == undefined) return;
|
|
220
200
|
value = unwrap(value);
|
|
221
|
-
if (part === undefined ||
|
|
201
|
+
if (part === undefined || isWrappable(prev) && isWrappable(value) && !Array.isArray(value)) {
|
|
222
202
|
mergeStoreNode(prev, value);
|
|
223
203
|
} else setProperty(current, part, value);
|
|
224
204
|
}
|
|
@@ -228,9 +208,7 @@ function createStore(...[store, options]) {
|
|
|
228
208
|
const wrappedStore = wrap$1(unwrappedStore);
|
|
229
209
|
function setStore(...args) {
|
|
230
210
|
batch(() => {
|
|
231
|
-
isArray && args.length === 1
|
|
232
|
-
? updateArray(unwrappedStore, args[0])
|
|
233
|
-
: updatePath(unwrappedStore, args);
|
|
211
|
+
isArray && args.length === 1 ? updateArray(unwrappedStore, args[0]) : updatePath(unwrappedStore, args);
|
|
234
212
|
});
|
|
235
213
|
}
|
|
236
214
|
return [wrappedStore, setStore];
|
|
@@ -238,19 +216,11 @@ function createStore(...[store, options]) {
|
|
|
238
216
|
|
|
239
217
|
function proxyDescriptor(target, property) {
|
|
240
218
|
const desc = Reflect.getOwnPropertyDescriptor(target, property);
|
|
241
|
-
if (
|
|
242
|
-
!desc ||
|
|
243
|
-
desc.get ||
|
|
244
|
-
desc.set ||
|
|
245
|
-
!desc.configurable ||
|
|
246
|
-
property === $PROXY ||
|
|
247
|
-
property === $NODE
|
|
248
|
-
)
|
|
249
|
-
return desc;
|
|
219
|
+
if (!desc || desc.get || desc.set || !desc.configurable || property === $PROXY || property === $NODE) return desc;
|
|
250
220
|
delete desc.value;
|
|
251
221
|
delete desc.writable;
|
|
252
222
|
desc.get = () => target[$PROXY][property];
|
|
253
|
-
desc.set = v =>
|
|
223
|
+
desc.set = v => target[$PROXY][property] = v;
|
|
254
224
|
return desc;
|
|
255
225
|
}
|
|
256
226
|
const proxyTraps = {
|
|
@@ -268,24 +238,14 @@ const proxyTraps = {
|
|
|
268
238
|
if (!tracked) {
|
|
269
239
|
const desc = Object.getOwnPropertyDescriptor(target, property);
|
|
270
240
|
const isFunction = typeof value === "function";
|
|
271
|
-
if (getListener() && (!isFunction || target.hasOwnProperty(property)) && !(desc && desc.get))
|
|
272
|
-
value = getNode(nodes, property, value)();
|
|
273
|
-
else if (value != null && isFunction && value === Array.prototype[property]) {
|
|
241
|
+
if (getListener() && (!isFunction || target.hasOwnProperty(property)) && !(desc && desc.get)) value = getNode(nodes, property, value)();else if (value != null && isFunction && value === Array.prototype[property]) {
|
|
274
242
|
return (...args) => batch(() => Array.prototype[property].apply(receiver, args));
|
|
275
243
|
}
|
|
276
244
|
}
|
|
277
245
|
return isWrappable(value) ? wrap(value) : value;
|
|
278
246
|
},
|
|
279
247
|
has(target, property) {
|
|
280
|
-
if (
|
|
281
|
-
property === $RAW ||
|
|
282
|
-
property === $PROXY ||
|
|
283
|
-
property === $TRACK ||
|
|
284
|
-
property === $NODE ||
|
|
285
|
-
property === $HAS ||
|
|
286
|
-
property === "__proto__"
|
|
287
|
-
)
|
|
288
|
-
return true;
|
|
248
|
+
if (property === $RAW || property === $PROXY || property === $TRACK || property === $NODE || property === $HAS || property === "__proto__") return true;
|
|
289
249
|
getListener() && getNode(getNodes(target, $HAS), property)();
|
|
290
250
|
return property in target;
|
|
291
251
|
},
|
|
@@ -304,16 +264,12 @@ function wrap(value) {
|
|
|
304
264
|
let p = value[$PROXY];
|
|
305
265
|
if (!p) {
|
|
306
266
|
Object.defineProperty(value, $PROXY, {
|
|
307
|
-
value:
|
|
267
|
+
value: p = new Proxy(value, proxyTraps)
|
|
308
268
|
});
|
|
309
269
|
const keys = Object.keys(value),
|
|
310
270
|
desc = Object.getOwnPropertyDescriptors(value);
|
|
311
271
|
const proto = Object.getPrototypeOf(value);
|
|
312
|
-
const isClass =
|
|
313
|
-
value !== null &&
|
|
314
|
-
typeof value === "object" &&
|
|
315
|
-
!Array.isArray(value) &&
|
|
316
|
-
proto !== Object.prototype;
|
|
272
|
+
const isClass = value !== null && typeof value === "object" && !Array.isArray(value) && proto !== Object.prototype;
|
|
317
273
|
if (isClass) {
|
|
318
274
|
const descriptors = Object.getOwnPropertyDescriptors(proto);
|
|
319
275
|
keys.push(...Object.keys(descriptors));
|
|
@@ -355,42 +311,19 @@ function applyState(target, parent, property, merge, key) {
|
|
|
355
311
|
const previous = parent[property];
|
|
356
312
|
if (target === previous) return;
|
|
357
313
|
const isArray = Array.isArray(target);
|
|
358
|
-
if (
|
|
359
|
-
property !== $ROOT &&
|
|
360
|
-
(!isWrappable(target) ||
|
|
361
|
-
!isWrappable(previous) ||
|
|
362
|
-
isArray !== Array.isArray(previous) ||
|
|
363
|
-
(key && target[key] !== previous[key]))
|
|
364
|
-
) {
|
|
314
|
+
if (property !== $ROOT && (!isWrappable(target) || !isWrappable(previous) || isArray !== Array.isArray(previous) || key && target[key] !== previous[key])) {
|
|
365
315
|
setProperty(parent, property, target);
|
|
366
316
|
return;
|
|
367
317
|
}
|
|
368
318
|
if (isArray) {
|
|
369
|
-
if (
|
|
370
|
-
target.length &&
|
|
371
|
-
previous.length &&
|
|
372
|
-
(!merge || (key && target[0] && target[0][key] != null))
|
|
373
|
-
) {
|
|
319
|
+
if (target.length && previous.length && (!merge || key && target[0] && target[0][key] != null)) {
|
|
374
320
|
let i, j, start, end, newEnd, item, newIndicesNext, keyVal;
|
|
375
|
-
for (
|
|
376
|
-
start = 0, end = Math.min(previous.length, target.length);
|
|
377
|
-
start < end &&
|
|
378
|
-
(previous[start] === target[start] ||
|
|
379
|
-
(key && previous[start] && target[start] && previous[start][key] === target[start][key]));
|
|
380
|
-
start++
|
|
381
|
-
) {
|
|
321
|
+
for (start = 0, end = Math.min(previous.length, target.length); start < end && (previous[start] === target[start] || key && previous[start] && target[start] && previous[start][key] === target[start][key]); start++) {
|
|
382
322
|
applyState(target[start], previous, start, merge, key);
|
|
383
323
|
}
|
|
384
324
|
const temp = new Array(target.length),
|
|
385
325
|
newIndices = new Map();
|
|
386
|
-
for (
|
|
387
|
-
end = previous.length - 1, newEnd = target.length - 1;
|
|
388
|
-
end >= start &&
|
|
389
|
-
newEnd >= start &&
|
|
390
|
-
(previous[end] === target[newEnd] ||
|
|
391
|
-
(key && previous[start] && target[start] && previous[end][key] === target[newEnd][key]));
|
|
392
|
-
end--, newEnd--
|
|
393
|
-
) {
|
|
326
|
+
for (end = previous.length - 1, newEnd = target.length - 1; end >= start && newEnd >= start && (previous[end] === target[newEnd] || key && previous[start] && target[start] && previous[end][key] === target[newEnd][key]); end--, newEnd--) {
|
|
394
327
|
temp[newEnd] = previous[end];
|
|
395
328
|
}
|
|
396
329
|
if (start > newEnd || start > end) {
|
|
@@ -444,19 +377,16 @@ function applyState(target, parent, property, merge, key) {
|
|
|
444
377
|
}
|
|
445
378
|
}
|
|
446
379
|
function reconcile(value, options = {}) {
|
|
447
|
-
const {
|
|
380
|
+
const {
|
|
381
|
+
merge,
|
|
382
|
+
key = "id"
|
|
383
|
+
} = options,
|
|
448
384
|
v = unwrap(value);
|
|
449
385
|
return state => {
|
|
450
386
|
if (!isWrappable(state) || !isWrappable(v)) return v;
|
|
451
|
-
const res = applyState(
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
[$ROOT]: state
|
|
455
|
-
},
|
|
456
|
-
$ROOT,
|
|
457
|
-
merge,
|
|
458
|
-
key
|
|
459
|
-
);
|
|
387
|
+
const res = applyState(v, {
|
|
388
|
+
[$ROOT]: state
|
|
389
|
+
}, $ROOT, merge, key);
|
|
460
390
|
return res === undefined ? state : res;
|
|
461
391
|
};
|
|
462
392
|
}
|
|
@@ -466,10 +396,7 @@ const setterTraps = {
|
|
|
466
396
|
if (property === $RAW) return target;
|
|
467
397
|
const value = target[property];
|
|
468
398
|
let proxy;
|
|
469
|
-
return isWrappable(value)
|
|
470
|
-
? producers.get(value) ||
|
|
471
|
-
(producers.set(value, (proxy = new Proxy(value, setterTraps))), proxy)
|
|
472
|
-
: value;
|
|
399
|
+
return isWrappable(value) ? producers.get(value) || (producers.set(value, proxy = new Proxy(value, setterTraps)), proxy) : value;
|
|
473
400
|
},
|
|
474
401
|
set(target, property, value) {
|
|
475
402
|
setProperty(target, property, unwrap(value));
|
|
@@ -485,7 +412,7 @@ function produce(fn) {
|
|
|
485
412
|
if (isWrappable(state)) {
|
|
486
413
|
let proxy;
|
|
487
414
|
if (!(proxy = producers.get(state))) {
|
|
488
|
-
producers.set(state,
|
|
415
|
+
producers.set(state, proxy = new Proxy(state, setterTraps));
|
|
489
416
|
}
|
|
490
417
|
fn(proxy);
|
|
491
418
|
}
|
package/store/types/index.d.ts
CHANGED
|
@@ -1,26 +1,12 @@
|
|
|
1
1
|
export { $RAW, createStore, unwrap } from "./store.js";
|
|
2
|
-
export type {
|
|
3
|
-
ArrayFilterFn,
|
|
4
|
-
DeepMutable,
|
|
5
|
-
DeepReadonly,
|
|
6
|
-
NotWrappable,
|
|
7
|
-
Part,
|
|
8
|
-
SetStoreFunction,
|
|
9
|
-
SolidStore,
|
|
10
|
-
Store,
|
|
11
|
-
StoreNode,
|
|
12
|
-
StorePathRange,
|
|
13
|
-
StoreSetter
|
|
14
|
-
} from "./store.js";
|
|
2
|
+
export type { ArrayFilterFn, DeepMutable, DeepReadonly, NotWrappable, Part, SetStoreFunction, SolidStore, Store, StoreNode, StorePathRange, StoreSetter } from "./store.js";
|
|
15
3
|
export * from "./mutable.js";
|
|
16
4
|
export * from "./modifiers.js";
|
|
17
5
|
import { $NODE, isWrappable } from "./store.js";
|
|
18
|
-
export declare const DEV:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
readonly hooks: {
|
|
6
|
+
export declare const DEV: {
|
|
7
|
+
readonly $NODE: typeof $NODE;
|
|
8
|
+
readonly isWrappable: typeof isWrappable;
|
|
9
|
+
readonly hooks: {
|
|
23
10
|
onStoreNodeUpdate: import("./store.js").OnStoreNodeUpdate | null;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
| undefined;
|
|
11
|
+
};
|
|
12
|
+
} | undefined;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
export type ReconcileOptions = {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
key?: string | null;
|
|
3
|
+
merge?: boolean;
|
|
4
4
|
};
|
|
5
|
-
export declare function reconcile<T extends U, U>(
|
|
6
|
-
value: T,
|
|
7
|
-
options?: ReconcileOptions
|
|
8
|
-
): (state: U) => T;
|
|
5
|
+
export declare function reconcile<T extends U, U>(value: T, options?: ReconcileOptions): (state: U) => T;
|
|
9
6
|
export declare function produce<T>(fn: (state: T) => void): (state: T) => T;
|
package/store/types/mutable.d.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { StoreNode } from "./store.js";
|
|
2
|
-
export declare function createMutable<T extends StoreNode>(
|
|
3
|
-
state: T,
|
|
4
|
-
options?: {
|
|
2
|
+
export declare function createMutable<T extends StoreNode>(state: T, options?: {
|
|
5
3
|
name?: string;
|
|
6
|
-
|
|
7
|
-
): T;
|
|
4
|
+
}): T;
|
|
8
5
|
export declare function modifyMutable<T>(state: T, modifier: (state: T) => T): void;
|
package/store/types/server.d.ts
CHANGED
|
@@ -2,23 +2,15 @@ import type { SetStoreFunction, Store } from "./store.js";
|
|
|
2
2
|
export declare const $RAW: unique symbol;
|
|
3
3
|
export declare function isWrappable(obj: any): boolean;
|
|
4
4
|
export declare function unwrap<T>(item: T): T;
|
|
5
|
-
export declare function setProperty(
|
|
6
|
-
state: any,
|
|
7
|
-
property: PropertyKey,
|
|
8
|
-
value: any,
|
|
9
|
-
force?: boolean
|
|
10
|
-
): void;
|
|
5
|
+
export declare function setProperty(state: any, property: PropertyKey, value: any, force?: boolean): void;
|
|
11
6
|
export declare function updatePath(current: any, path: any[], traversed?: PropertyKey[]): void;
|
|
12
7
|
export declare function createStore<T>(state: T | Store<T>): [Store<T>, SetStoreFunction<T>];
|
|
13
8
|
export declare function createMutable<T>(state: T | Store<T>): T;
|
|
14
9
|
type ReconcileOptions = {
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
key?: string | null;
|
|
11
|
+
merge?: boolean;
|
|
17
12
|
};
|
|
18
|
-
export declare function reconcile<T extends U, U extends object>(
|
|
19
|
-
value: T,
|
|
20
|
-
options?: ReconcileOptions
|
|
21
|
-
): (state: U) => T;
|
|
13
|
+
export declare function reconcile<T extends U, U extends object>(value: T, options?: ReconcileOptions): (state: U) => T;
|
|
22
14
|
export declare function produce<T>(fn: (state: T) => void): (state: T) => T;
|
|
23
15
|
export declare const DEV: undefined;
|
|
24
16
|
export {};
|