mobx-keystone 1.15.0 → 1.16.0
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/CHANGELOG.md +5 -0
- package/dist/mobx-keystone.esm.js +367 -72
- package/dist/mobx-keystone.esm.mjs +367 -72
- package/dist/mobx-keystone.umd.js +367 -72
- package/dist/types/types/TypeChecker.d.ts +5 -0
- package/dist/types/types/arrayBased/typesArray.d.ts +2 -0
- package/dist/types/types/arrayBased/typesTuple.d.ts +2 -0
- package/dist/types/types/objectBased/typesArraySet.d.ts +2 -0
- package/dist/types/types/objectBased/typesDataModelData.d.ts +5 -0
- package/dist/types/types/objectBased/typesModel.d.ts +5 -0
- package/dist/types/types/objectBased/typesObject.d.ts +6 -0
- package/dist/types/types/objectBased/typesObjectMap.d.ts +2 -0
- package/dist/types/types/objectBased/typesRecord.d.ts +2 -0
- package/dist/types/types/objectBased/typesRef.d.ts +1 -0
- package/dist/types/types/primitiveBased/typesPrimitive.d.ts +4 -0
- package/dist/types/types/typeCheckErrorUtils.d.ts +1 -0
- package/dist/types/types/utility/typesOr.d.ts +2 -0
- package/dist/types/types/utility/typesRefinement.d.ts +2 -0
- package/dist/types/types/utility/typesTag.d.ts +2 -0
- package/dist/types/types/utility/typesUnchecked.d.ts +1 -0
- package/package.json +1 -1
- package/src/tweaker/typeChecking.ts +116 -24
- package/src/types/TypeChecker.ts +18 -0
- package/src/types/arrayBased/typesArray.ts +20 -4
- package/src/types/arrayBased/typesTuple.ts +27 -4
- package/src/types/objectBased/typesArraySet.ts +6 -0
- package/src/types/objectBased/typesDataModelData.ts +28 -0
- package/src/types/objectBased/typesModel.ts +28 -0
- package/src/types/objectBased/typesObject.ts +84 -23
- package/src/types/objectBased/typesObjectMap.ts +6 -0
- package/src/types/objectBased/typesRecord.ts +24 -3
- package/src/types/objectBased/typesRef.ts +3 -1
- package/src/types/primitiveBased/typesPrimitive.ts +11 -3
- package/src/types/typeCheckErrorUtils.ts +23 -0
- package/src/types/utility/typesOr.ts +74 -16
- package/src/types/utility/typesRefinement.ts +6 -0
- package/src/types/utility/typesTag.ts +6 -0
- package/src/types/utility/typesUnchecked.ts +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 1.16.0
|
|
4
|
+
|
|
5
|
+
- Fixed a long-standing bug: model auto type-checking now enforces ancestor property refinements (for example refinements on `a.b`) when mutating nested child model data (for example `a.b.x`), while still avoiding unnecessary ancestor checks when no refinement is present on the path.
|
|
6
|
+
- Performance: reduced runtime type-check overhead by caching object prop checker resolution, avoiding success-path child path allocations in object/array/tuple/record checks, and narrowing `types.or` branch checks by base type.
|
|
7
|
+
|
|
3
8
|
## 1.15.0
|
|
4
9
|
|
|
5
10
|
- Added `registerModels(...)` to explicitly keep model/data-model class references at runtime (useful in snapshot-heavy apps where imports may be elided).
|