mobx-state-tree 6.0.1 → 7.0.0-pre.2
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/dist/core/type/type.d.ts +4 -2
- package/dist/mobx-state-tree.js +18 -1
- package/dist/mobx-state-tree.min.js +1 -1
- package/dist/mobx-state-tree.module.js +18 -1
- package/dist/mobx-state-tree.umd.js +18 -1
- package/dist/mobx-state-tree.umd.min.js +1 -1
- package/dist/types/complex-types/model.d.ts +1 -1
- package/dist/types/utility-types/snapshotProcessor.d.ts +2 -2
- package/package.json +3 -3
|
@@ -41,7 +41,7 @@ type DefinablePropsNames<T> = {
|
|
|
41
41
|
}[keyof T];
|
|
42
42
|
/** @hidden */
|
|
43
43
|
export type ExtractCFromProps<P extends ModelProperties> = MaybeEmpty<{
|
|
44
|
-
[k in keyof P]: P[k]["CreationType"];
|
|
44
|
+
[k in keyof P]: P[k]["CreationType"] | P[k]["TypeWithoutSTN"];
|
|
45
45
|
}>;
|
|
46
46
|
/** @hidden */
|
|
47
47
|
export type MaybeEmpty<T> = keyof T extends never ? EmptyObject : T;
|
|
@@ -19,12 +19,12 @@ export interface ISnapshotProcessors<IT extends IAnyType, CustomC, CustomS> {
|
|
|
19
19
|
/**
|
|
20
20
|
* Function that transforms an input snapshot.
|
|
21
21
|
*/
|
|
22
|
-
preProcessor?(snapshot: CustomC): IT["CreationType"];
|
|
22
|
+
preProcessor?(snapshot: _CustomOrOther<CustomC, IT["CreationType"]>): IT["CreationType"];
|
|
23
23
|
/**
|
|
24
24
|
* Function that transforms an output snapshot.
|
|
25
25
|
* @param snapshot
|
|
26
26
|
*/
|
|
27
|
-
postProcessor?(snapshot: IT["SnapshotType"], node: Instance<IT>): CustomS
|
|
27
|
+
postProcessor?(snapshot: IT["SnapshotType"], node: Instance<IT>): _CustomOrOther<CustomS, IT["SnapshotType"]>;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* `types.snapshotProcessor` - Runs a pre/post snapshot processor before/after serializing a given type.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mobx-state-tree",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0-pre.2",
|
|
4
4
|
"description": "Opinionated, transactional, MobX powered state container",
|
|
5
5
|
"main": "dist/mobx-state-tree.js",
|
|
6
6
|
"umd:main": "dist/mobx-state-tree.umd.js",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"typings": "dist/index.d.ts",
|
|
16
16
|
"sideEffects": false,
|
|
17
17
|
"scripts": {
|
|
18
|
-
"clean": "shx rm -rf dist
|
|
19
|
-
"build": "bun run clean && tsc && cpr lib dist --filter=\\.js$ && rollup -c",
|
|
18
|
+
"clean": "shx rm -rf dist lib",
|
|
19
|
+
"build": "bun run clean && tsc && cpr lib/src dist --filter=\\.js$ && rollup -c",
|
|
20
20
|
"test:dev": "./scripts/bun-test-dev.sh",
|
|
21
21
|
"test:prod": "./scripts/bun-test-prod.sh",
|
|
22
22
|
"test:all": "bun run test:dev && bun run test:prod && bun run size",
|