New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mobx-state-tree

Package Overview
Dependencies
Maintainers
8
Versions
129
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mobx-state-tree - npm Package Compare versions

Comparing version 7.0.0-pre.1 to 7.0.0-pre.2

6

dist/core/type/type.d.ts
import { IValidationContext, IValidationResult, IStateTreeNode, ModelPrimitive } from "../../internal";
import type { WritableKeys } from "ts-essentials";
/**

@@ -9,2 +10,3 @@ * A state tree node value.

declare const $type: unique symbol;
type ExcludeReadonly<T> = T extends {} ? T[WritableKeys<T>] : T;
/**

@@ -29,3 +31,3 @@ * A type, either complex or simple.

*/
create(snapshot?: C, env?: any): this["Type"];
create(snapshot?: C | ExcludeReadonly<T>, env?: any): this["Type"];
/**

@@ -45,3 +47,3 @@ * Checks if a given snapshot / instance is of the given type.

*/
validate(thing: C, context: IValidationContext): IValidationResult;
validate(thing: C | T, context: IValidationContext): IValidationResult;
/**

@@ -48,0 +50,0 @@ * Gets the textual representation of the type as a string.

@@ -44,3 +44,3 @@ import { IAnyType, IType, _CustomOrOther, _NotCustomized, Instance, FunctionWithFlag } from "../../internal";

export type ExtractCFromProps<P extends ModelProperties> = MaybeEmpty<{
[k in keyof P]: P[k]["CreationType"];
[k in keyof P]: P[k]["CreationType"] | P[k]["TypeWithoutSTN"];
}>;

@@ -47,0 +47,0 @@ /** @hidden */

@@ -22,3 +22,3 @@ import { IType, IAnyType, Instance } from "../../internal";

*/
preProcessor?(snapshot: CustomC): IT["CreationType"];
preProcessor?(snapshot: _CustomOrOther<CustomC, IT["CreationType"]>): IT["CreationType"];
/**

@@ -28,3 +28,3 @@ * Function that transforms an output snapshot.

*/
postProcessor?(snapshot: IT["SnapshotType"], node: Instance<IT>): CustomS;
postProcessor?(snapshot: IT["SnapshotType"], node: Instance<IT>): _CustomOrOther<CustomS, IT["SnapshotType"]>;
}

@@ -31,0 +31,0 @@ /**

{
"name": "mobx-state-tree",
"version": "7.0.0-pre.1",
"version": "7.0.0-pre.2",
"description": "Opinionated, transactional, MobX powered state container",

@@ -18,4 +18,4 @@ "main": "dist/mobx-state-tree.js",

"scripts": {
"clean": "shx rm -rf dist && shx rm -rf lib",
"build": "bun run clean && tsc && cpr lib dist --filter=\\.js$ && rollup -c",
"clean": "shx rm -rf dist lib",
"build": "bun run clean && tsc && cpr lib/src dist --filter=\\.js$ && rollup -c",
"test:dev": "./scripts/bun-test-dev.sh",

@@ -22,0 +22,0 @@ "test:prod": "./scripts/bun-test-prod.sh",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc