mobx-keystone 1.1.0 → 1.2.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.
Files changed (53) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/mobx-keystone.esm.js +69 -60
  3. package/dist/mobx-keystone.esm.mjs +69 -60
  4. package/dist/mobx-keystone.umd.js +69 -60
  5. package/dist/types/action/applyMethodCall.d.ts +1 -1
  6. package/dist/types/action/middleware.d.ts +1 -1
  7. package/dist/types/actionMiddlewares/undoMiddleware.d.ts +2 -2
  8. package/dist/types/dataModel/BaseDataModel.d.ts +2 -2
  9. package/dist/types/dataModel/DataModel.d.ts +1 -1
  10. package/dist/types/model/BaseModel.d.ts +4 -4
  11. package/dist/types/model/Model.d.ts +5 -5
  12. package/dist/types/modelShared/BaseModelShared.d.ts +9 -9
  13. package/dist/types/modelShared/prop.d.ts +15 -15
  14. package/dist/types/modelShared/sharedInternalModel.d.ts +2 -2
  15. package/dist/types/parent/pathTypes.d.ts +3 -3
  16. package/dist/types/patch/Patch.d.ts +1 -1
  17. package/dist/types/patch/emitPatch.d.ts +3 -3
  18. package/dist/types/patch/jsonPatch.d.ts +1 -1
  19. package/dist/types/ref/core.d.ts +3 -3
  20. package/dist/types/snapshot/SnapshotOf.d.ts +8 -8
  21. package/dist/types/snapshot/onSnapshot.d.ts +2 -2
  22. package/dist/types/treeUtils/sandbox.d.ts +1 -1
  23. package/dist/types/types/TypeCheckError.d.ts +9 -5
  24. package/dist/types/types/objectBased/typesDataModelData.d.ts +2 -2
  25. package/dist/types/types/objectBased/typesModel.d.ts +2 -2
  26. package/dist/types/types/primitiveBased/typesEnum.d.ts +1 -1
  27. package/dist/types/types/schemas.d.ts +6 -6
  28. package/dist/types/utils/types.d.ts +5 -5
  29. package/dist/types/wrappers/ArraySet.d.ts +3 -1
  30. package/dist/types/wrappers/ObjectMap.d.ts +3 -1
  31. package/package.json +15 -15
  32. package/src/computedTree/computedTree.ts +99 -98
  33. package/src/dataModel/newDataModel.ts +1 -1
  34. package/src/model/newModel.ts +1 -1
  35. package/src/snapshot/applySnapshot.ts +153 -136
  36. package/src/tweaker/tweak.ts +1 -1
  37. package/src/tweaker/typeChecking.ts +1 -1
  38. package/src/types/TypeCheckError.ts +30 -15
  39. package/src/types/TypeChecker.ts +7 -6
  40. package/src/types/arrayBased/typesArray.ts +106 -106
  41. package/src/types/arrayBased/typesTuple.ts +3 -3
  42. package/src/types/objectBased/typesArraySet.ts +3 -3
  43. package/src/types/objectBased/typesDataModelData.ts +2 -2
  44. package/src/types/objectBased/typesModel.ts +3 -3
  45. package/src/types/objectBased/typesObject.ts +221 -221
  46. package/src/types/objectBased/typesObjectMap.ts +3 -3
  47. package/src/types/objectBased/typesRecord.ts +3 -3
  48. package/src/types/objectBased/typesRef.ts +3 -3
  49. package/src/types/primitiveBased/typesPrimitive.ts +10 -4
  50. package/src/types/typeCheck.ts +21 -21
  51. package/src/types/utility/typesOr.ts +3 -3
  52. package/src/types/utility/typesRefinement.ts +111 -105
  53. package/src/types/utility/typesTag.ts +80 -80
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Change Log
2
2
 
3
+ ## 1.2.0
4
+
5
+ - TypeCheckError now includes a new `message` field, a new `typeCheckedValue` field and no longer requires a parameter for the `throw()` method.
6
+ - Type checking error messages will now include the actual value that failed validation in the error message.
7
+
8
+ ## 1.1.1
9
+
10
+ - Fixed an issue related to computed trees.
11
+
3
12
  ## 1.1.0
4
13
 
5
14
  - Added `idProp.typedAs<T>()` to be able to type an ID prop with a string template.