You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@builder.io/mobx-state-tree

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@builder.io/mobx-state-tree - npm Package Compare versions

Comparing version

to
3.14.1

dist/core/actionContext.d.ts

28

dist/core/action.d.ts

@@ -1,14 +0,15 @@

import { IDisposer, IAnyStateTreeNode } from "../internal";
import { IDisposer, IAnyStateTreeNode, IActionContext } from "../internal";
export declare type IMiddlewareEventType = "action" | "flow_spawn" | "flow_resume" | "flow_resume_error" | "flow_return" | "flow_throw";
export declare type IMiddlewareEvent = {
type: IMiddlewareEventType;
name: string;
id: number;
parentId: number;
rootId: number;
allParentIds: number[];
context: IAnyStateTreeNode;
tree: IAnyStateTreeNode;
args: any[];
};
export interface IMiddlewareEvent extends IActionContext {
/** Event type */
readonly type: IMiddlewareEventType;
/** Parent event unique id */
readonly parentId: number;
/** Parent event object */
readonly parentEvent: IMiddlewareEvent | undefined;
/** Root event unique id */
readonly rootId: number;
/** Id of all events, from root until current (excluding current) */
readonly allParentIds: number[];
}
export declare type IMiddlewareHandler = (actionCall: IMiddlewareEvent, next: (actionCall: IMiddlewareEvent, callback?: (value: any) => any) => void, abort: (value: any) => void) => any;

@@ -46,4 +47,5 @@ /**

* @param fn
* @param includeHooks
* @returns The original function
*/
export declare function decorate<T extends Function>(handler: IMiddlewareHandler, fn: T): T;
export declare function decorate<T extends Function>(handler: IMiddlewareHandler, fn: T, includeHooks?: boolean): T;

@@ -6,8 +6,8 @@ /**

export interface IJsonPatch {
op: "replace" | "add" | "remove";
path: string;
value?: any;
readonly op: "replace" | "add" | "remove";
readonly path: string;
readonly value?: any;
}
export interface IReversibleJsonPatch extends IJsonPatch {
oldValue: any;
readonly oldValue: any;
}

@@ -14,0 +14,0 @@ /**

@@ -1,4 +0,4 @@

import { ExtractT, IAnyStateTreeNode, IType, IAnyModelType, IStateTreeNode, IJsonPatch, IDisposer, IAnyType, ModelPrimitive, ExtractNodeC, ReferenceIdentifier } from "../internal";
import { IAnyStateTreeNode, IType, IAnyModelType, IStateTreeNode, IJsonPatch, IDisposer, IAnyType, ReferenceIdentifier, TypeOfValue, IActionContext, IAnyComplexType } from "../internal";
/** @hidden */
export declare type TypeOrStateTreeNodeToStateTreeNode<T extends IAnyType | IAnyStateTreeNode> = T extends IType<any, any, infer TT> ? TT : T;
export declare type TypeOrStateTreeNodeToStateTreeNode<T extends IAnyType | IAnyStateTreeNode> = T extends IType<any, any, infer TT> ? TT & IStateTreeNode<T> : T;
/**

@@ -10,5 +10,6 @@ * Returns the _actual_ type of the given tree node. (Or throws)

*/
export declare function getType(object: IAnyStateTreeNode): IAnyType;
export declare function getType(object: IAnyStateTreeNode): IAnyComplexType;
/**
* Returns the _declared_ type of the given sub property of an object, array or map.
* In the case of arrays and maps the property name is optional and will be ignored.
*

@@ -24,6 +25,6 @@ * Example:

* @param object
* @param child
* @param propertyName
* @returns
*/
export declare function getChildType(object: IAnyStateTreeNode, child: string): IAnyType;
export declare function getChildType(object: IAnyStateTreeNode, propertyName?: string): IAnyType;
/**

@@ -41,3 +42,3 @@ * Registers a function that will be invoked for each mutation that is applied to the provided model instance, or to any of its children.

* Registers a function that is invoked whenever a new snapshot for the given model instance is available.
* The listener will only be fire at the and of the current MobX (trans)action.
* The listener will only be fire at the end of the current MobX (trans)action.
* See [snapshots](https://github.com/mobxjs/mobx-state-tree#snapshots) for more details.

@@ -49,3 +50,3 @@ *

*/
export declare function onSnapshot<S>(target: IStateTreeNode<any, S>, callback: (snapshot: S) => void): IDisposer;
export declare function onSnapshot<S>(target: IStateTreeNode<IType<any, S, any>>, callback: (snapshot: S) => void): IDisposer;
/**

@@ -65,2 +66,4 @@ * Applies a JSON-patch to the given model instance or bails out if the patch couldn't be applied

inversePatches: ReadonlyArray<IJsonPatch>;
reversedInversePatches: ReadonlyArray<IJsonPatch>;
readonly recording: boolean;
stop(): void;

@@ -82,6 +85,8 @@ resume(): void;

* inversePatches: IJsonPatch[]
* // true if currently recording
* recording: boolean
* // stop recording patches
* stop(): void
* // resume recording patches
* resume()
* resume(): void
* // apply all the recorded patches on the given target (the original subject if omitted)

@@ -95,6 +100,9 @@ * replay(target?: IAnyStateTreeNode): void

*
* The optional filter function allows to skip recording certain patches.
*
* @param subject
* @param filter
* @returns
*/
export declare function recordPatches(subject: IAnyStateTreeNode): IPatchRecorder;
export declare function recordPatches(subject: IAnyStateTreeNode, filter?: (patch: IJsonPatch, inversePatch: IJsonPatch, actionContext: IActionContext | undefined) => boolean): IPatchRecorder;
/**

@@ -142,3 +150,3 @@ * The inverse of `unprotect`.

*/
export declare function applySnapshot<C>(target: IStateTreeNode<C, any>, snapshot: C): void;
export declare function applySnapshot<C>(target: IStateTreeNode<IType<C, any, any>>, snapshot: C): void;
/**

@@ -152,3 +160,3 @@ * Calculates a snapshot from the given model instance. The snapshot will always reflect the latest state but use

*/
export declare function getSnapshot<S>(target: IStateTreeNode<any, S>, applyPostProcess?: boolean): S;
export declare function getSnapshot<S>(target: IStateTreeNode<IType<any, S, any>>, applyPostProcess?: boolean): S;
/**

@@ -175,3 +183,3 @@ * Given a model instance, returns `true` if the object has a parent, that is, is part of another object, map or array.

*/
export declare function getParent<IT extends IAnyStateTreeNode | IAnyType>(target: IAnyStateTreeNode, depth?: number): TypeOrStateTreeNodeToStateTreeNode<IT>;
export declare function getParent<IT extends IAnyStateTreeNode | IAnyComplexType>(target: IAnyStateTreeNode, depth?: number): TypeOrStateTreeNodeToStateTreeNode<IT>;
/**

@@ -184,3 +192,3 @@ * Given a model instance, returns `true` if the object has a parent of given type, that is, is part of another object, map or array

*/
export declare function hasParentOfType(target: IAnyStateTreeNode, type: IAnyType): boolean;
export declare function hasParentOfType(target: IAnyStateTreeNode, type: IAnyComplexType): boolean;
/**

@@ -193,3 +201,3 @@ * Returns the target's parent of a given type, or throws.

*/
export declare function getParentOfType<IT extends IAnyType>(target: IAnyStateTreeNode, type: IT): ExtractT<IT>;
export declare function getParentOfType<IT extends IAnyComplexType>(target: IAnyStateTreeNode, type: IT): IT["Type"];
/**

@@ -204,3 +212,3 @@ * Given an object in a model tree, returns the root object of that tree.

*/
export declare function getRoot<IT extends IAnyType | IAnyStateTreeNode>(target: IAnyStateTreeNode): TypeOrStateTreeNodeToStateTreeNode<IT>;
export declare function getRoot<IT extends IAnyComplexType | IAnyStateTreeNode>(target: IAnyStateTreeNode): TypeOrStateTreeNodeToStateTreeNode<IT>;
/**

@@ -245,3 +253,3 @@ * Returns the path of the given object in the model tree

*/
export declare function resolveIdentifier<IT extends IAnyType>(type: IT, target: IAnyStateTreeNode, identifier: ReferenceIdentifier): ExtractT<IT> | undefined;
export declare function resolveIdentifier<IT extends IAnyModelType>(type: IT, target: IAnyStateTreeNode, identifier: ReferenceIdentifier): IT["Type"] | undefined;
/**

@@ -376,3 +384,3 @@ * Returns the identifier of the target node.

*/
export declare function getPropertyMembers(typeOrNode: IAnyModelType | IStateTreeNode): IModelReflectionPropertiesData;
export declare function getPropertyMembers(typeOrNode: IAnyModelType | IAnyStateTreeNode): IModelReflectionPropertiesData;
export interface IModelReflectionData extends IModelReflectionPropertiesData {

@@ -390,5 +398,4 @@ actions: string[];

export declare function getMembers(target: IAnyStateTreeNode): IModelReflectionData;
export declare function cast<O extends ModelPrimitive = never>(snapshotOrInstance: O): O;
export declare function cast<I extends ExtractNodeC<O>, O = never>(snapshotOrInstance: I): O;
export declare function cast<I extends ExtractNodeC<O>, O = never>(snapshotOrInstance: I | O): O;
export declare function cast<O extends string | number | boolean | null | undefined = never>(snapshotOrInstance: O): O;
export declare function cast<O = never>(snapshotOrInstance: TypeOfValue<O>["CreationType"] | TypeOfValue<O>["SnapshotType"] | TypeOfValue<O>["Type"]): O;
/**

@@ -421,3 +428,3 @@ * Casts a node instance type to an snapshot type so it can be assigned to a type snapshot (e.g. to be used inside a create call).

*/
export declare function castToSnapshot<I>(snapshotOrInstance: I): Extract<I, IAnyStateTreeNode> extends never ? I : ExtractNodeC<I>;
export declare function castToSnapshot<I>(snapshotOrInstance: I): Extract<I, IAnyStateTreeNode> extends never ? I : TypeOfValue<I>["CreationType"];
/**

@@ -452,1 +459,11 @@ * Casts a node instance type to a reference snapshot type so it can be assigned to a refernence snapshot (e.g. to be used inside a create call).

export declare function castToReferenceSnapshot<I>(instance: I): Extract<I, IAnyStateTreeNode> extends never ? I : ReferenceIdentifier;
/**
* Returns the unique node id (not to be confused with the instance identifier) for a
* given instance.
* This id is a number that is unique for each instance.
*
* @export
* @param target
* @returns
*/
export declare function getNodeId(target: IAnyStateTreeNode): number;

@@ -1,1 +0,17 @@

export {};
/**
* @hidden
*/
export declare enum Hook {
afterCreate = "afterCreate",
afterAttach = "afterAttach",
afterCreationFinalization = "afterCreationFinalization",
beforeDetach = "beforeDetach",
beforeDestroy = "beforeDestroy"
}
export interface IHooks {
[Hook.afterCreate]?: () => void;
[Hook.afterAttach]?: () => void;
[Hook.beforeDetach]?: () => void;
[Hook.beforeDestroy]?: () => void;
}
export declare type IHooksGetter<T> = (self: T) => IHooks;

@@ -0,3 +1,4 @@

import { IAnyType, STNValue, Instance, IAnyComplexType } from "../../internal";
/** @hidden */
declare const $stateTreeNodeTypes: unique symbol;
declare const $stateTreeNodeType: unique symbol;
/**

@@ -7,12 +8,7 @@ * Common interface that represents a node instance.

*/
export interface IStateTreeNode<C = any, S = any> {
readonly [$stateTreeNodeTypes]?: [C, S] | [any, any];
export interface IStateTreeNode<IT extends IAnyType = IAnyType> {
readonly [$stateTreeNodeType]?: [IT] | [any];
}
declare type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
/** @hidden */
export declare type RedefineIStateTreeNode<T, STN extends IAnyStateTreeNode> = T extends IAnyStateTreeNode ? Omit<T, typeof $stateTreeNodeTypes> & STN : T;
/** @hidden */
export declare type ExtractNodeC<T> = T extends IStateTreeNode<infer C, any> ? C : never;
/** @hidden */
export declare type ExtractNodeS<T> = T extends IStateTreeNode<any, infer S> ? S : never;
export declare type TypeOfValue<T extends IAnyStateTreeNode> = T extends IStateTreeNode<infer IT> ? IT : never;
/**

@@ -22,3 +18,3 @@ * Represents any state tree node instance.

*/
export interface IAnyStateTreeNode extends IStateTreeNode<any, any> {
export interface IAnyStateTreeNode extends STNValue<any, IAnyType> {
}

@@ -33,3 +29,3 @@ /**

*/
export declare function isStateTreeNode<C = any, S = any>(value: any): value is IStateTreeNode<C, S>;
export declare function isStateTreeNode<IT extends IAnyComplexType = IAnyComplexType>(value: any): value is STNValue<Instance<IT>, IT>;
export {};

@@ -1,2 +0,2 @@

import { IAnyType, ExtractC, ExtractS, ExtractT } from "../../internal";
import { IAnyType, ExtractCSTWithSTN } from "../../internal";
/** Validation context entry, this is, where the validation should run against which type */

@@ -30,2 +30,2 @@ export interface IValidationContextEntry {

*/
export declare function typecheck<IT extends IAnyType>(type: IAnyType, value: ExtractC<IT> | ExtractS<IT> | ExtractT<IT>): void;
export declare function typecheck<IT extends IAnyType>(type: IT, value: ExtractCSTWithSTN<IT>): void;

@@ -1,29 +0,15 @@

import { IValidationContext, IValidationResult, IStateTreeNode, ModelPrimitive, IAnyStateTreeNode } from "../../internal";
import { IValidationContext, IValidationResult, IStateTreeNode, ModelPrimitive } from "../../internal";
/**
* Name of the properties of an object that can't be set to undefined
* A state tree node value.
* @hidden
*/
export declare type DefinablePropsNames<T> = {
[K in keyof T]: Extract<T[K], undefined> extends never ? K : never;
}[keyof T];
export declare type STNValue<T, IT extends IAnyType> = T extends object ? T & IStateTreeNode<IT> : T;
/** @hidden */
declare const $type: unique symbol;
/**
* Checks if a type is any or unknown
* @hidden
*/
export declare type IsTypeAnyOrUnknown<T> = unknown extends T ? true : false;
/**
* Checks if a type supports an empty create() function
* Basically !any, !unknown, X | undefined, objects with all properties being optional
* @hidden
*/
export declare type IsEmptyCreationType<O> = IsTypeAnyOrUnknown<O> extends true ? true : Extract<O, undefined> extends never ? (DefinablePropsNames<O> extends never | undefined ? true : false) : true;
/**
* Chooses a create function based on the creation type.
* @hidden
*/
export declare type CreateParams<C> = IsEmptyCreationType<C> extends false ? [C, any?] : [C?, any?];
/**
* A type, either complex or simple.
*/
export interface IType<C, S, T> {
/** @hidden */
readonly [$type]: undefined;
/**

@@ -33,4 +19,7 @@ * Friendly type name.

name: string;
create(...args: CreateParams<C>): T;
/**
* Name of the identifier attribute or null if none.
*/
readonly identifierAttribute?: string;
/**
* Creates an instance for the type given an snapshot input.

@@ -40,3 +29,3 @@ *

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

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

*/
is(thing: any): thing is C | S | T;
is(thing: any): thing is C | this["Type"];
/**

@@ -57,3 +46,3 @@ * Run's the type's typechecker on the given value with the given validation context.

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

@@ -67,8 +56,13 @@ * Gets the textual representation of the type as a string.

*/
Type: T;
readonly Type: STNValue<T, this>;
/**
* @deprecated do not use.
* @hidden
*/
readonly TypeWithoutSTN: T;
/**
* @deprecated use `SnapshotOut<typeof MyType>` instead.
* @hidden
*/
SnapshotType: S;
readonly SnapshotType: S;
/**

@@ -78,3 +72,3 @@ * @deprecated use `SnapshotIn<typeof MyType>` instead.

*/
CreationType: C;
readonly CreationType: C;
}

@@ -84,3 +78,4 @@ /**

*/
export declare type IAnyType = IType<any, any, any>;
export interface IAnyType extends IType<any, any, any> {
}
/**

@@ -98,3 +93,3 @@ * A simple type, this is, a type where the instance and the snapshot representation are the same.

*/
export interface IComplexType<C, S, T> extends IType<C, S, T & IStateTreeNode<C, S>> {
export interface IComplexType<C, S, T> extends IType<C, S, T & object> {
}

@@ -104,23 +99,39 @@ /**

*/
export declare type IAnyComplexType = IType<any, any, IAnyStateTreeNode>;
export interface IAnyComplexType extends IType<any, any, object> {
}
/** @hidden */
export declare type ExtractC<T extends IAnyType> = T extends IType<infer C, any, any> ? C : never;
export declare type ExtractCSTWithoutSTN<IT extends {
[$type]: undefined;
CreationType: any;
SnapshotType: any;
TypeWithoutSTN: any;
}> = IT["CreationType"] | IT["SnapshotType"] | IT["TypeWithoutSTN"];
/** @hidden */
export declare type ExtractS<T extends IAnyType> = T extends IType<any, infer S, any> ? S : never;
/** @hidden */
export declare type ExtractT<T extends IAnyType> = T extends IType<any, any, infer X> ? X : never;
/** @hidden */
export declare type ExtractCST<IT extends IAnyType> = IT extends IType<infer C, infer S, infer T> ? C | S | T : never;
export declare type ExtractCSTWithSTN<IT extends {
[$type]: undefined;
CreationType: any;
SnapshotType: any;
Type: any;
}> = IT["CreationType"] | IT["SnapshotType"] | IT["Type"];
/**
* The instance representation of a given type.
*/
export declare type Instance<T> = T extends IStateTreeNode ? T : T extends IType<any, any, infer TT> ? TT : T;
export declare type Instance<T> = T extends {
[$type]: undefined;
Type: any;
} ? T["Type"] : T;
/**
* The input (creation) snapshot representation of a given type.
*/
export declare type SnapshotIn<T> = T extends IStateTreeNode<infer STNC, any> ? STNC : T extends IType<infer TC, any, any> ? TC : T;
export declare type SnapshotIn<T> = T extends {
[$type]: undefined;
CreationType: any;
} ? T["CreationType"] : T extends IStateTreeNode<infer IT> ? IT["CreationType"] : T;
/**
* The output snapshot representation of a given type.
*/
export declare type SnapshotOut<T> = T extends IStateTreeNode<any, infer STNS> ? STNS : T extends IType<any, infer TS, any> ? TS : T;
export declare type SnapshotOut<T> = T extends {
[$type]: undefined;
SnapshotType: any;
} ? T["SnapshotType"] : T extends IStateTreeNode<infer IT> ? IT["SnapshotType"] : T;
/**

@@ -160,1 +171,2 @@ * A type which is equivalent to the union of SnapshotIn and Instance types of a given typeof TYPE or typeof VARIABLE.

export declare function isType(value: any): value is IAnyType;
export {};

@@ -1,3 +0,3 @@

export { IModelType, IAnyModelType, IDisposer, IMSTMap, IMapType, IMSTArray, IArrayType, IType, IAnyType, ISimpleType, IComplexType, IAnyComplexType, IReferenceType, _CustomCSProcessor, _CustomOrOther, _CustomJoin, _NotCustomized, typecheck, escapeJsonPath, unescapeJsonPath, joinJsonPath, splitJsonPath, IJsonPatch, IReversibleJsonPatch, decorate, addMiddleware, IMiddlewareEvent, IMiddlewareHandler, IMiddlewareEventType, process, isStateTreeNode, IStateTreeNode, IAnyStateTreeNode, flow, castFlowReturn, applyAction, onAction, IActionRecorder, ISerializedActionCall, recordActions, createActionTrackingMiddleware, setLivelinessChecking, getLivelinessChecking, LivelinessMode, setLivelynessChecking, // to be deprecated
export { IModelType, IAnyModelType, IDisposer, IMSTMap, IMapType, IMSTArray, IArrayType, IType, IAnyType, ModelPrimitive, ISimpleType, IComplexType, IAnyComplexType, IReferenceType, _CustomCSProcessor, _CustomOrOther, _CustomJoin, _NotCustomized, typecheck, escapeJsonPath, unescapeJsonPath, joinJsonPath, splitJsonPath, IJsonPatch, IReversibleJsonPatch, decorate, addMiddleware, IMiddlewareEvent, IActionTrackingMiddleware2Call, IMiddlewareHandler, IMiddlewareEventType, IActionTrackingMiddlewareHooks, IActionTrackingMiddleware2Hooks, process, isStateTreeNode, IStateTreeNode, IAnyStateTreeNode, flow, castFlowReturn, applyAction, onAction, IActionRecorder, ISerializedActionCall, recordActions, createActionTrackingMiddleware, createActionTrackingMiddleware2, setLivelinessChecking, getLivelinessChecking, LivelinessMode, setLivelynessChecking, // to be deprecated
LivelynessMode, // to be deprecated
ModelSnapshotType, ModelCreationType, ModelSnapshotType2, ModelCreationType2, ModelInstanceType, ModelInstanceTypeProps, ModelPropertiesDeclarationToProperties, ModelProperties, ModelPropertiesDeclaration, OptionalProperty, ModelActions, ITypeUnion, CustomTypeOptions, UnionOptions, Instance, SnapshotIn, SnapshotOut, SnapshotOrInstance, TypeOrStateTreeNodeToStateTreeNode, UnionStringArray, getType, getChildType, onPatch, onSnapshot, applyPatch, IPatchRecorder, recordPatches, protect, unprotect, isProtected, applySnapshot, getSnapshot, hasParent, getParent, hasParentOfType, getParentOfType, getRoot, getPath, getPathParts, isRoot, resolvePath, resolveIdentifier, getIdentifier, tryResolve, getRelativePath, clone, detach, destroy, isAlive, addDisposer, getEnv, walk, IModelReflectionData, IModelReflectionPropertiesData, IMaybeIType, IMaybe, IMaybeNull, IOptionalIType, OptionalDefaultValueOrFunction, getMembers, getPropertyMembers, ExtractNodeC, ExtractNodeS, cast, castToSnapshot, castToReferenceSnapshot, isType, isArrayType, isFrozenType, isIdentifierType, isLateType, isLiteralType, isMapType, isModelType, isOptionalType, isPrimitiveType, isReferenceType, isRefinementType, isUnionType, tryReference, isValidReference, OnReferenceInvalidated, OnReferenceInvalidatedEvent, ReferenceOptions, ReferenceOptionsGetSet, ReferenceOptionsOnInvalidated, ReferenceIdentifier, types } from "./internal";
ModelSnapshotType, ModelCreationType, ModelSnapshotType2, ModelCreationType2, ModelInstanceType, ModelInstanceTypeProps, ModelPropertiesDeclarationToProperties, ModelProperties, ModelPropertiesDeclaration, ModelActions, ITypeUnion, CustomTypeOptions, UnionOptions, Instance, SnapshotIn, SnapshotOut, SnapshotOrInstance, TypeOrStateTreeNodeToStateTreeNode, UnionStringArray, getType, getChildType, onPatch, onSnapshot, applyPatch, IPatchRecorder, recordPatches, protect, unprotect, isProtected, applySnapshot, getSnapshot, hasParent, getParent, hasParentOfType, getParentOfType, getRoot, getPath, getPathParts, isRoot, resolvePath, resolveIdentifier, getIdentifier, tryResolve, getRelativePath, clone, detach, destroy, isAlive, addDisposer, getEnv, walk, IModelReflectionData, IModelReflectionPropertiesData, IMaybeIType, IMaybe, IMaybeNull, IOptionalIType, OptionalDefaultValueOrFunction, ValidOptionalValue, ValidOptionalValues, getMembers, getPropertyMembers, TypeOfValue, cast, castToSnapshot, castToReferenceSnapshot, isType, isArrayType, isFrozenType, isIdentifierType, isLateType, isLiteralType, isMapType, isModelType, isOptionalType, isPrimitiveType, isReferenceType, isRefinementType, isUnionType, tryReference, isValidReference, OnReferenceInvalidated, OnReferenceInvalidatedEvent, ReferenceOptions, ReferenceOptionsGetSet, ReferenceOptionsOnInvalidated, ReferenceIdentifier, ISnapshotProcessor, ISnapshotProcessors, getNodeId, IActionContext, getRunningActionContext, isActionContextChildOf, isActionContextThisOrChildOf, types } from "./internal";

@@ -9,4 +9,6 @@ export * from "./core/node/livelinessChecking";

export * from "./middlewares/create-action-tracking-middleware";
export * from "./middlewares/createActionTrackingMiddleware2";
export * from "./middlewares/on-action";
export * from "./core/action";
export * from "./core/actionContext";
export * from "./core/type/type-checker";

@@ -20,2 +22,3 @@ export * from "./core/node/identifier-cache";

export * from "./utils";
export * from "./types/utility-types/snapshotProcessor";
export * from "./types/complex-types/map";

@@ -22,0 +25,0 @@ export * from "./types/complex-types/array";

@@ -11,2 +11,4 @@ import { IMiddlewareEvent, IMiddlewareHandler } from "../internal";

/**
* Note: Consider migrating to `createActionTrackingMiddleware2`, it is easier to use.
*
* Convenience utility to create action based middleware that supports async processes more easily.

@@ -13,0 +15,0 @@ * All hooks are called for both synchronous and asynchronous actions. Except that either `onSuccess` or `onFail` is called

@@ -1,2 +0,2 @@

import { IDisposer, IAnyStateTreeNode } from "../internal";
import { IDisposer, IAnyStateTreeNode, IActionContext } from "../internal";
export interface ISerializedActionCall {

@@ -9,3 +9,5 @@ name: string;

actions: ReadonlyArray<ISerializedActionCall>;
readonly recording: boolean;
stop(): void;
resume(): void;
replay(target: IAnyStateTreeNode): void;

@@ -31,13 +33,19 @@ }

* actions: ISerializedActionCall[]
* // true if currently recording
* recording: boolean
* // stop recording actions
* stop(): any
* stop(): void
* // resume recording actions
* resume(): void
* // apply all the recorded actions on the given object
* replay(target: IStateTreeNode): any
* replay(target: IAnyStateTreeNode): void
* }
* ```
*
* The optional filter function allows to skip recording certain actions.
*
* @param subject
* @returns
*/
export declare function recordActions(subject: IAnyStateTreeNode): IActionRecorder;
export declare function recordActions(subject: IAnyStateTreeNode, filter?: (action: ISerializedActionCall, actionContext: IActionContext | undefined) => boolean): IActionRecorder;
/**

@@ -44,0 +52,0 @@ * Registers a function that will be invoked for each action that is called on the provided model instance, or to any of its children.

import { IObservableArray } from "mobx";
import { IAnyType, IStateTreeNode, IType, OptionalProperty, ExtractS, ExtractC, ExtractT, ExtractCST } from "../../internal";
import { ExtractCSTWithSTN, IAnyType, IHooksGetter, IType } from "../../internal";
/** @hidden */
export interface IMSTArray<IT extends IAnyType> extends IObservableArray<ExtractT<IT>>, IStateTreeNode<ExtractC<IT>[] | undefined, ExtractS<IT>[]> {
push(...items: ExtractT<IT>[]): number;
push(...items: ExtractCST<IT>[]): number;
concat(...items: ConcatArray<ExtractT<IT>>[]): ExtractT<IT>[];
concat(...items: ConcatArray<ExtractCST<IT>>[]): ExtractT<IT>[];
concat(...items: (ExtractT<IT> | ConcatArray<ExtractT<IT>>)[]): ExtractT<IT>[];
concat(...items: (ExtractCST<IT> | ConcatArray<ExtractCST<IT>>)[]): ExtractT<IT>[];
splice(start: number, deleteCount?: number): ExtractT<IT>[];
splice(start: number, deleteCount: number, ...items: ExtractT<IT>[]): ExtractT<IT>[];
splice(start: number, deleteCount: number, ...items: ExtractCST<IT>[]): ExtractT<IT>[];
unshift(...items: ExtractT<IT>[]): number;
unshift(...items: ExtractCST<IT>[]): number;
export interface IMSTArray<IT extends IAnyType> extends IObservableArray<IT["Type"]> {
push(...items: IT["Type"][]): number;
push(...items: ExtractCSTWithSTN<IT>[]): number;
concat(...items: ConcatArray<IT["Type"]>[]): IT["Type"][];
concat(...items: ConcatArray<ExtractCSTWithSTN<IT>>[]): IT["Type"][];
concat(...items: (IT["Type"] | ConcatArray<IT["Type"]>)[]): IT["Type"][];
concat(...items: (ExtractCSTWithSTN<IT> | ConcatArray<ExtractCSTWithSTN<IT>>)[]): IT["Type"][];
splice(start: number, deleteCount?: number): IT["Type"][];
splice(start: number, deleteCount: number, ...items: IT["Type"][]): IT["Type"][];
splice(start: number, deleteCount: number, ...items: ExtractCSTWithSTN<IT>[]): IT["Type"][];
unshift(...items: IT["Type"][]): number;
unshift(...items: ExtractCSTWithSTN<IT>[]): number;
}
/** @hidden */
export interface IArrayType<IT extends IAnyType> extends IType<ExtractC<IT>[] | undefined, ExtractS<IT>[], IMSTArray<IT>>, OptionalProperty {
export interface IArrayType<IT extends IAnyType> extends IType<IT["CreationType"][] | undefined, IT["SnapshotType"][], IMSTArray<IT>> {
hooks(hooks: IHooksGetter<IMSTArray<IAnyType>>): IArrayType<IT>;
}

@@ -20,0 +21,0 @@ /**

import { IInterceptor, IKeyValueMap, IMapDidChange, IMapWillChange, Lambda } from "mobx";
import { IAnyType, IType, OptionalProperty, ExtractC, ExtractS, ExtractT, ExtractCST, IStateTreeNode } from "../../internal";
import { IAnyType, IType, ExtractCSTWithSTN, IHooksGetter } from "../../internal";
/** @hidden */
export interface IMapType<IT extends IAnyType> extends IType<IKeyValueMap<ExtractC<IT>> | undefined, IKeyValueMap<ExtractS<IT>>, IMSTMap<IT>>, OptionalProperty {
export interface IMapType<IT extends IAnyType> extends IType<IKeyValueMap<IT["CreationType"]> | undefined, IKeyValueMap<IT["SnapshotType"]>, IMSTMap<IT>> {
hooks(hooks: IHooksGetter<IMSTMap<IT>>): IMapType<IT>;
}
/** @hidden */
export interface IMSTMap<IT extends IAnyType> extends IStateTreeNode<IKeyValueMap<ExtractC<IT>> | undefined, IKeyValueMap<ExtractS<IT>>> {
export interface IMSTMap<IT extends IAnyType> {
clear(): void;
delete(key: string): boolean;
forEach(callbackfn: (value: ExtractT<IT>, key: string, map: IMSTMap<IT>) => void, thisArg?: any): void;
get(key: string): ExtractT<IT> | undefined;
forEach(callbackfn: (value: IT["Type"], key: string, map: this) => void, thisArg?: any): void;
get(key: string): IT["Type"] | undefined;
has(key: string): boolean;
set(key: string, value: ExtractCST<IT>): this;
set(key: string, value: ExtractCSTWithSTN<IT>): this;
readonly size: number;
put(value: ExtractCST<IT>): ExtractT<IT>;
put(value: ExtractCSTWithSTN<IT>): IT["Type"];
keys(): IterableIterator<string>;
values(): IterableIterator<ExtractT<IT>>;
entries(): IterableIterator<[string, ExtractT<IT>]>;
[Symbol.iterator](): IterableIterator<[string, ExtractT<IT>]>;
values(): IterableIterator<IT["Type"]>;
entries(): IterableIterator<[string, IT["Type"]]>;
[Symbol.iterator](): IterableIterator<[string, IT["Type"]]>;
/** Merge another object into this map, returns self. */
merge(other: IMSTMap<IType<any, any, ExtractT<IT>>> | IKeyValueMap<ExtractCST<IT>> | any): this;
replace(values: IMSTMap<IType<any, any, ExtractT<IT>>> | IKeyValueMap<ExtractT<IT>>): this;
merge(other: IMSTMap<IType<any, any, IT["TypeWithoutSTN"]>> | IKeyValueMap<ExtractCSTWithSTN<IT>> | any): this;
replace(values: IMSTMap<IType<any, any, IT["TypeWithoutSTN"]>> | IKeyValueMap<ExtractCSTWithSTN<IT>> | any): this;
/**

@@ -28,9 +29,9 @@ * Returns a plain object that represents this map.

*/
toPOJO(): IKeyValueMap<ExtractS<IT>>;
toJSON(): IKeyValueMap<ExtractS<IT>>;
toPOJO(): IKeyValueMap<IT["SnapshotType"]>;
toJSON(): IKeyValueMap<IT["SnapshotType"]>;
/**
* Returns a shallow non observable object clone of this map.
* Note that the values migth still be observable. For a deep clone use mobx.toJS.
* Note that the values might still be observable. For a deep clone use mobx.toJS.
*/
toJS(): Map<string, ExtractT<IT>>;
toJS(): Map<string, IT["Type"]>;
toString(): string;

@@ -43,4 +44,4 @@ [Symbol.toStringTag]: "Map";

*/
observe(listener: (changes: IMapDidChange<string, ExtractT<IT>>) => void, fireImmediately?: boolean): Lambda;
intercept(handler: IInterceptor<IMapWillChange<string, ExtractT<IT>>>): Lambda;
observe(listener: (changes: IMapDidChange<string, IT["Type"]>) => void, fireImmediately?: boolean): Lambda;
intercept(handler: IInterceptor<IMapWillChange<string, IT["Type"]>>): Lambda;
}

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

@@ -1,2 +0,2 @@

import { IAnyType, IStateTreeNode, IType, ExtractC, ExtractS, ExtractT } from "../../internal";
import { IAnyType, IType, _CustomOrOther, _NotCustomized, Instance } from "../../internal";
/** @hidden */

@@ -17,53 +17,40 @@ export interface ModelProperties {

*/
export declare type ModelPropertiesDeclarationToProperties<T extends ModelPropertiesDeclaration> = {
[K in keyof T]: T[K] extends string ? IType<string | undefined, string, string> & OptionalProperty : T[K] extends number ? IType<number | undefined, number, number> & OptionalProperty : T[K] extends boolean ? IType<boolean | undefined, boolean, boolean> & OptionalProperty : T[K] extends Date ? IType<number | Date | undefined, number, Date> & OptionalProperty : T[K] extends IAnyType ? T[K] : never;
export declare type ModelPropertiesDeclarationToProperties<T extends ModelPropertiesDeclaration> = T extends {
[k: string]: IAnyType;
} ? T : {
[K in keyof T]: T[K] extends IAnyType ? T[K] : T[K] extends string ? IType<string | undefined, string, string> : T[K] extends number ? IType<number | undefined, number, number> : T[K] extends boolean ? IType<boolean | undefined, boolean, boolean> : T[K] extends Date ? IType<number | Date | undefined, number, Date> : never;
};
/** @hidden */
declare const $optionalProperty: unique symbol;
/** @hidden */
export interface OptionalProperty {
readonly [$optionalProperty]: undefined;
}
/** @hidden */
declare const $mstNotCustomized: unique symbol;
/** @hidden */
export interface _NotCustomized {
readonly [$mstNotCustomized]: undefined;
}
/** @hidden */
export declare type _CustomOrOther<Custom, Other> = Custom extends _NotCustomized ? Other : Custom;
/**
* Maps property types to the snapshot, including omitted optional attributes
* Checks if a value is optional (undefined, any or unknown).
* @hidden
*
* Examples:
* - string = false
* - undefined = true
* - string | undefined = true
* - string & undefined = false, but we don't care
* - any = true
* - unknown = true
*/
export declare type RequiredPropNames<T> = {
[K in keyof T]: T[K] extends OptionalProperty ? never : K;
declare type IsOptionalValue<C, TV, FV> = undefined extends C ? TV : FV;
/**
* Name of the properties of an object that can't be set to undefined, any or unknown
* @hidden
*/
declare type DefinablePropsNames<T> = {
[K in keyof T]: IsOptionalValue<T[K], never, K>;
}[keyof T];
/** @hidden */
export declare type RequiredProps<T> = Pick<T, RequiredPropNames<T>>;
/** @hidden */
export declare type RequiredPropsObject<P extends ModelProperties> = {
[K in keyof RequiredProps<P>]: P[K];
};
/** @hidden */
export declare type OptionalPropNames<T> = {
[K in keyof T]: T[K] extends OptionalProperty ? K : never;
}[keyof T];
/** @hidden */
export declare type OptionalProps<T> = Pick<T, OptionalPropNames<T>>;
/** @hidden */
export declare type OptionalPropsObject<P extends ModelProperties> = {
[K in keyof OptionalProps<P>]?: P[K];
};
/** @hidden */
export declare type ExtractCFromProps<P extends ModelProperties> = {
[k in keyof P]: ExtractC<P[k]>;
[k in keyof P]: P[k]["CreationType"];
};
/** @hidden */
export declare type ModelCreationType<P extends ModelProperties> = ExtractCFromProps<RequiredPropsObject<P> & OptionalPropsObject<P>>;
export declare type ModelCreationType<PC> = {
[P in DefinablePropsNames<PC>]: PC[P];
} & Partial<PC>;
/** @hidden */
export declare type ModelCreationType2<P extends ModelProperties, CustomC> = _CustomOrOther<CustomC, ModelCreationType<P>>;
export declare type ModelCreationType2<P extends ModelProperties, CustomC> = _CustomOrOther<CustomC, ModelCreationType<ExtractCFromProps<P>>>;
/** @hidden */
export declare type ModelSnapshotType<P extends ModelProperties> = {
[K in keyof P]: ExtractS<P[K]>;
[K in keyof P]: P[K]["SnapshotType"];
};

@@ -77,3 +64,3 @@ /** @hidden */

export declare type ModelInstanceTypeProps<P extends ModelProperties> = {
[K in keyof P]: ExtractT<P[K]>;
[K in keyof P]: P[K]["Type"];
};

@@ -84,3 +71,3 @@ /**

*/
export declare type ModelInstanceType<P extends ModelProperties, O, CustomC, CustomS> = ModelInstanceTypeProps<P> & O & IStateTreeNode<ModelCreationType2<P, CustomC>, ModelSnapshotType2<P, CustomS>>;
export declare type ModelInstanceType<P extends ModelProperties, O> = ModelInstanceTypeProps<P> & O;
/** @hidden */

@@ -90,10 +77,10 @@ export interface ModelActions {

}
export interface IModelType<PROPS extends ModelProperties, OTHERS, CustomC = _NotCustomized, CustomS = _NotCustomized> extends IType<ModelCreationType2<PROPS, CustomC>, ModelSnapshotType2<PROPS, CustomS>, ModelInstanceType<PROPS, OTHERS, CustomC, CustomS>> {
export interface IModelType<PROPS extends ModelProperties, OTHERS, CustomC = _NotCustomized, CustomS = _NotCustomized> extends IType<ModelCreationType2<PROPS, CustomC>, ModelSnapshotType2<PROPS, CustomS>, ModelInstanceType<PROPS, OTHERS>> {
readonly properties: PROPS;
named(newName: string): IModelType<PROPS, OTHERS, CustomC, CustomS>;
props<PROPS2 extends ModelPropertiesDeclaration>(props: PROPS2): IModelType<PROPS & ModelPropertiesDeclarationToProperties<PROPS2>, OTHERS, CustomC, CustomS>;
views<V extends Object>(fn: (self: ModelInstanceType<PROPS, OTHERS, CustomC, CustomS>) => V): IModelType<PROPS, OTHERS & V, CustomC, CustomS>;
actions<A extends ModelActions>(fn: (self: ModelInstanceType<PROPS, OTHERS, CustomC, CustomS>) => A): IModelType<PROPS, OTHERS & A, CustomC, CustomS>;
volatile<TP extends object>(fn: (self: ModelInstanceType<PROPS, OTHERS, CustomC, CustomS>) => TP): IModelType<PROPS, OTHERS & TP, CustomC, CustomS>;
extend<A extends ModelActions = {}, V extends Object = {}, VS extends Object = {}>(fn: (self: ModelInstanceType<PROPS, OTHERS, CustomC, CustomS>) => {
views<V extends Object>(fn: (self: Instance<this>) => V): IModelType<PROPS, OTHERS & V, CustomC, CustomS>;
actions<A extends ModelActions>(fn: (self: Instance<this>) => A): IModelType<PROPS, OTHERS & A, CustomC, CustomS>;
volatile<TP extends object>(fn: (self: Instance<this>) => TP): IModelType<PROPS, OTHERS & TP, CustomC, CustomS>;
extend<A extends ModelActions = {}, V extends Object = {}, VS extends Object = {}>(fn: (self: Instance<this>) => {
actions?: A;

@@ -103,3 +90,5 @@ views?: V;

}): IModelType<PROPS, OTHERS & A & V & VS, CustomC, CustomS>;
/** @deprecated See `types.snapshotProcessor` */
preProcessSnapshot<NewC = ModelCreationType2<PROPS, CustomC>>(fn: (snapshot: NewC) => ModelCreationType2<PROPS, CustomC>): IModelType<PROPS, OTHERS, NewC, CustomS>;
/** @deprecated See `types.snapshotProcessor` */
postProcessSnapshot<NewS = ModelSnapshotType2<PROPS, CustomS>>(fn: (snapshot: ModelSnapshotType2<PROPS, CustomS>) => NewS): IModelType<PROPS, OTHERS, CustomC, NewS>;

@@ -106,0 +95,0 @@ }

@@ -1,2 +0,2 @@

import { enumeration, model, compose, custom, reference, safeReference, union, optional, literal, maybe, maybeNull, refinement, map, array, frozen, late } from "../internal";
import { enumeration, model, compose, custom, reference, safeReference, union, optional, literal, maybe, maybeNull, refinement, map, array, frozen, late, snapshotProcessor } from "../internal";
export declare const types: {

@@ -15,15 +15,16 @@ enumeration: typeof enumeration;

refinement: typeof refinement;
string: import("../core/type/type").ISimpleType<string>;
boolean: import("../core/type/type").ISimpleType<boolean>;
number: import("../core/type/type").ISimpleType<number>;
integer: import("../core/type/type").ISimpleType<number>;
Date: import("../core/type/type").IType<number | Date, number, Date>;
string: import("../internal").ISimpleType<string>;
boolean: import("../internal").ISimpleType<boolean>;
number: import("../internal").ISimpleType<number>;
integer: import("../internal").ISimpleType<number>;
Date: import("../internal").IType<number | Date, number, Date>;
map: typeof map;
array: typeof array;
frozen: typeof frozen;
identifier: import("../core/type/type").ISimpleType<string>;
identifierNumber: import("../core/type/type").ISimpleType<number>;
identifier: import("../internal").ISimpleType<string>;
identifierNumber: import("../internal").ISimpleType<number>;
late: typeof late;
undefined: import("../core/type/type").ISimpleType<undefined>;
null: import("../core/type/type").ISimpleType<null>;
undefined: import("../internal").ISimpleType<undefined>;
null: import("../internal").ISimpleType<null>;
snapshotProcessor: typeof snapshotProcessor;
};

@@ -1,4 +0,4 @@

import { IType, OptionalProperty } from "../../internal";
import { IType } from "../../internal";
export declare function frozen<C>(subType: IType<C, any, any>): IType<C, C, C>;
export declare function frozen<T>(defaultValue: T): IType<T | undefined | null, T, T> & OptionalProperty;
export declare function frozen<T>(defaultValue: T): IType<T | undefined | null, T, T>;
export declare function frozen<T = any>(): IType<T, T, T>;

@@ -5,0 +5,0 @@ /**

@@ -1,4 +0,4 @@

import { IType, IAnyType, ExtractC, ExtractS, ExtractT, OptionalProperty, IStateTreeNode, RedefineIStateTreeNode } from "../../internal";
import { IType, IAnyType } from "../../internal";
/** @hidden */
export interface IMaybeIType<IT extends IAnyType, C, O> extends IType<ExtractC<IT> | C, ExtractS<IT> | O, RedefineIStateTreeNode<ExtractT<IT>, IStateTreeNode<ExtractC<IT> | C, ExtractS<IT> | O>> | O>, OptionalProperty {
export interface IMaybeIType<IT extends IAnyType, C, O> extends IType<IT["CreationType"] | C, IT["SnapshotType"] | O, IT["TypeWithoutSTN"] | O> {
}

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

@@ -1,31 +0,14 @@

import { IType, IAnyType, OptionalProperty, ExtractT, ExtractS, ExtractC, ExtractCST, RedefineIStateTreeNode, IStateTreeNode } from "../../internal";
import { IType, IAnyType, ExtractCSTWithSTN } from "../../internal";
/** @hidden */
export declare type OptionalDefaultValueOrFunction<IT extends IAnyType> = ExtractC<IT> | ExtractS<IT> | (() => ExtractCST<IT>);
export declare type ValidOptionalValue = string | boolean | number | null | undefined;
/** @hidden */
export interface IOptionalIType<IT extends IAnyType> extends IType<ExtractC<IT> | undefined, ExtractS<IT>, RedefineIStateTreeNode<ExtractT<IT>, IStateTreeNode<ExtractC<IT> | undefined, ExtractS<IT>>>>, OptionalProperty {
export declare type ValidOptionalValues = [ValidOptionalValue, ...ValidOptionalValue[]];
/** @hidden */
export declare type OptionalDefaultValueOrFunction<IT extends IAnyType> = IT["CreationType"] | IT["SnapshotType"] | (() => ExtractCSTWithSTN<IT>);
/** @hidden */
export interface IOptionalIType<IT extends IAnyType, OptionalVals extends ValidOptionalValues> extends IType<IT["CreationType"] | OptionalVals[number], IT["SnapshotType"], IT["TypeWithoutSTN"]> {
}
export declare function optional<IT extends IAnyType>(type: IT, defaultValueOrFunction: OptionalDefaultValueOrFunction<IT>): IOptionalIType<IT, [undefined]>;
export declare function optional<IT extends IAnyType, OptionalVals extends ValidOptionalValues>(type: IT, defaultValueOrFunction: OptionalDefaultValueOrFunction<IT>, optionalValues: OptionalVals): IOptionalIType<IT, OptionalVals>;
/**
* `types.optional` - Can be used to create a property with a default value.
* If the given value is not provided in the snapshot, it will default to the provided `defaultValue`.
* If `defaultValue` is a function, the function will be invoked for every new instance.
* Applying a snapshot in which the optional value is _not_ present, causes the value to be reset
*
* Example:
* ```ts
* const Todo = types.model({
* title: types.optional(types.string, "Test"),
* done: types.optional(types.boolean, false),
* created: types.optional(types.Date, () => new Date())
* })
*
* // it is now okay to omit 'created' and 'done'. created will get a freshly generated timestamp
* const todo = Todo.create({ title: "Get coffee "})
* ```
*
* @param type
* @param defaultValueOrFunction
* @returns
*/
export declare function optional<IT extends IAnyType>(type: IT, defaultValueOrFunction: OptionalDefaultValueOrFunction<IT>): IT extends OptionalProperty ? IT : IOptionalIType<IT>;
/**
* Returns if a value represents an optional type.

@@ -37,2 +20,2 @@ *

*/
export declare function isOptionalType<IT extends IType<any | undefined, any, any> & OptionalProperty>(type: IT): type is IT;
export declare function isOptionalType<IT extends IAnyType>(type: IT): type is IT;

@@ -1,2 +0,2 @@

import { IType, ExtractT, IAnyStateTreeNode, IAnyComplexType, IStateTreeNode, RedefineIStateTreeNode, IMaybe, ReferenceIdentifier } from "../../internal";
import { IType, IAnyType, IAnyStateTreeNode, IAnyComplexType, IMaybe, ReferenceIdentifier, IStateTreeNode } from "../../internal";
export declare type OnReferenceInvalidatedEvent<STN extends IAnyStateTreeNode> = {

@@ -11,12 +11,14 @@ parent: IAnyStateTreeNode;

export declare type OnReferenceInvalidated<STN extends IAnyStateTreeNode> = (event: OnReferenceInvalidatedEvent<STN>) => void;
/** @hidden */
export declare type ReferenceT<IT extends IAnyType> = IT["TypeWithoutSTN"] & IStateTreeNode<IReferenceType<IT>>;
export interface ReferenceOptionsGetSet<IT extends IAnyComplexType> {
get(identifier: ReferenceIdentifier, parent: IAnyStateTreeNode | null): ExtractT<IT>;
set(value: ExtractT<IT>, parent: IAnyStateTreeNode | null): ReferenceIdentifier;
get(identifier: ReferenceIdentifier, parent: IAnyStateTreeNode | null): ReferenceT<IT>;
set(value: ReferenceT<IT>, parent: IAnyStateTreeNode | null): ReferenceIdentifier;
}
export interface ReferenceOptionsOnInvalidated<IT extends IAnyComplexType> {
onInvalidated: OnReferenceInvalidated<ExtractT<IT>>;
onInvalidated: OnReferenceInvalidated<ReferenceT<IT>>;
}
export declare type ReferenceOptions<IT extends IAnyComplexType> = ReferenceOptionsGetSet<IT> | ReferenceOptionsOnInvalidated<IT> | (ReferenceOptionsGetSet<IT> & ReferenceOptionsOnInvalidated<IT>);
/** @hidden */
export interface IReferenceType<IT extends IAnyComplexType> extends IType<ReferenceIdentifier, ReferenceIdentifier, RedefineIStateTreeNode<ExtractT<IT>, IStateTreeNode<ReferenceIdentifier, ReferenceIdentifier>>> {
export interface IReferenceType<IT extends IAnyComplexType> extends IType<ReferenceIdentifier, ReferenceIdentifier, IT["TypeWithoutSTN"]> {
}

@@ -35,13 +37,7 @@ /**

export declare function isReferenceType<IT extends IReferenceType<any>>(type: IT): type is IT;
/**
* `types.safeReference` - A safe reference is like a standard reference, except that it accepts the undefined value by default
* and automatically sets itself to undefined (when the parent is a model) / removes itself from arrays and maps
* when the reference it is pointing to gets detached/destroyed.
*
* Strictly speaking it is a `types.maybe(types.reference(X))` with a customized `onInvalidate` option.
*
* @param subType
* @param options
* @returns
*/
export declare function safeReference<IT extends IAnyComplexType>(subType: IT, options?: ReferenceOptionsGetSet<IT>): IMaybe<IReferenceType<IT>>;
export declare function safeReference<IT extends IAnyComplexType>(subType: IT, options: (ReferenceOptionsGetSet<IT> | {}) & {
acceptsUndefined: false;
}): IReferenceType<IT>;
export declare function safeReference<IT extends IAnyComplexType>(subType: IT, options?: (ReferenceOptionsGetSet<IT> | {}) & {
acceptsUndefined?: boolean;
}): IMaybe<IReferenceType<IT>>;

@@ -1,4 +0,4 @@

import { IAnyType, ExtractC } from "../../internal";
export declare function refinement<IT extends IAnyType>(name: string, type: IT, predicate: (snapshot: ExtractC<IT>) => boolean, message?: string | ((v: ExtractC<IT>) => string)): IT;
export declare function refinement<IT extends IAnyType>(type: IT, predicate: (snapshot: ExtractC<IT>) => boolean, message?: string | ((v: ExtractC<IT>) => string)): IT;
import { IAnyType } from "../../internal";
export declare function refinement<IT extends IAnyType>(name: string, type: IT, predicate: (snapshot: IT["CreationType"]) => boolean, message?: string | ((v: IT["CreationType"]) => string)): IT;
export declare function refinement<IT extends IAnyType>(type: IT, predicate: (snapshot: IT["CreationType"]) => boolean, message?: string | ((v: IT["CreationType"]) => string)): IT;
/**

@@ -5,0 +5,0 @@ * Returns if a given value is a refinement type.

@@ -1,2 +0,2 @@

import { IType, IAnyType, IModelType, ModelProperties, ModelInstanceType, ModelSnapshotType2, ModelCreationType2, _NotCustomized, RedefineIStateTreeNode, IStateTreeNode } from "../../internal";
import { IType, IAnyType, IModelType, ModelProperties, ModelInstanceType, ModelSnapshotType2, ModelCreationType2, _NotCustomized } from "../../internal";
export declare type ITypeDispatcher = (snapshot: any) => IAnyType;

@@ -13,20 +13,20 @@ export interface UnionOptions {

/** @hidden */
export interface ITypeUnion<C, S, T> extends IType<_CustomCSProcessor<C>, _CustomCSProcessor<S>, RedefineIStateTreeNode<T, IStateTreeNode<_CustomCSProcessor<C>, _CustomCSProcessor<S>>>> {
export interface ITypeUnion<C, S, T> extends IType<_CustomCSProcessor<C>, _CustomCSProcessor<S>, T> {
}
export declare function union<PA extends ModelProperties, OA, FCA, FSA, PB extends ModelProperties, OB, FCB, FSB>(A: IModelType<PA, OA, FCA, FSA>, B: IModelType<PB, OB, FCB, FSB>): ITypeUnion<ModelCreationType2<PA, FCA> | ModelCreationType2<PB, FCB>, ModelSnapshotType2<PA, FSA> | ModelSnapshotType2<PB, FSB>, ModelInstanceType<PA, OA, FCA, FSA> | ModelInstanceType<PB, OB, FCB, FSB>>;
export declare function union<PA extends ModelProperties, OA, FCA, FSA, PB extends ModelProperties, OB, FCB, FSB>(options: UnionOptions, A: IModelType<PA, OA, FCA, FSA>, B: IModelType<PB, OB, FCB, FSB>): ITypeUnion<ModelCreationType2<PA, FCA> | ModelCreationType2<PB, FCB>, ModelSnapshotType2<PA, FSA> | ModelSnapshotType2<PB, FSB>, ModelInstanceType<PA, OA, FCA, FSA> | ModelInstanceType<PB, OB, FCB, FSB>>;
export declare function union<PA extends ModelProperties, OA, FCA, FSA, PB extends ModelProperties, OB, FCB, FSB, PC extends ModelProperties, OC, FCC, FSC>(A: IModelType<PA, OA, FCA, FSA>, B: IModelType<PB, OB, FCB, FSB>, C: IModelType<PC, OC, FCC, FSC>): ITypeUnion<ModelCreationType2<PA, FCA> | ModelCreationType2<PB, FCB> | ModelCreationType2<PC, FCC>, ModelSnapshotType2<PA, FSA> | ModelSnapshotType2<PB, FSB> | ModelSnapshotType2<PC, FSC>, ModelInstanceType<PA, OA, FCA, FSA> | ModelInstanceType<PB, OB, FCB, FSB> | ModelInstanceType<PC, OC, FCC, FSC>>;
export declare function union<PA extends ModelProperties, OA, FCA, FSA, PB extends ModelProperties, OB, FCB, FSB, PC extends ModelProperties, OC, FCC, FSC>(options: UnionOptions, A: IModelType<PA, OA, FCA, FSA>, B: IModelType<PB, OB, FCB, FSB>, C: IModelType<PC, OC, FCC, FSC>): ITypeUnion<ModelCreationType2<PA, FCA> | ModelCreationType2<PB, FCB> | ModelCreationType2<PC, FCC>, ModelSnapshotType2<PA, FSA> | ModelSnapshotType2<PB, FSB> | ModelSnapshotType2<PC, FSC>, ModelInstanceType<PA, OA, FCA, FSA> | ModelInstanceType<PB, OB, FCB, FSB> | ModelInstanceType<PC, OC, FCC, FSC>>;
export declare function union<PA extends ModelProperties, OA, FCA, FSA, PB extends ModelProperties, OB, FCB, FSB, PC extends ModelProperties, OC, FCC, FSC, PD extends ModelProperties, OD, FCD, FSD>(A: IModelType<PA, OA, FCA, FSA>, B: IModelType<PB, OB, FCB, FSB>, C: IModelType<PC, OC, FCC, FSC>, D: IModelType<PD, OD, FCD, FSD>): ITypeUnion<ModelCreationType2<PA, FCA> | ModelCreationType2<PB, FCB> | ModelCreationType2<PC, FCC> | ModelCreationType2<PD, FCD>, ModelSnapshotType2<PA, FSA> | ModelSnapshotType2<PB, FSB> | ModelSnapshotType2<PC, FSC> | ModelSnapshotType2<PD, FSD>, ModelInstanceType<PA, OA, FCA, FSA> | ModelInstanceType<PB, OB, FCB, FSB> | ModelInstanceType<PC, OC, FCC, FSC> | ModelInstanceType<PD, OD, FCD, FSD>>;
export declare function union<PA extends ModelProperties, OA, FCA, FSA, PB extends ModelProperties, OB, FCB, FSB, PC extends ModelProperties, OC, FCC, FSC, PD extends ModelProperties, OD, FCD, FSD>(options: UnionOptions, A: IModelType<PA, OA, FCA, FSA>, B: IModelType<PB, OB, FCB, FSB>, C: IModelType<PC, OC, FCC, FSC>, D: IModelType<PD, OD, FCD, FSD>): ITypeUnion<ModelCreationType2<PA, FCA> | ModelCreationType2<PB, FCB> | ModelCreationType2<PC, FCC> | ModelCreationType2<PD, FCD>, ModelSnapshotType2<PA, FSA> | ModelSnapshotType2<PB, FSB> | ModelSnapshotType2<PC, FSC> | ModelSnapshotType2<PD, FSD>, ModelInstanceType<PA, OA, FCA, FSA> | ModelInstanceType<PB, OB, FCB, FSB> | ModelInstanceType<PC, OC, FCC, FSC> | ModelInstanceType<PD, OD, FCD, FSD>>;
export declare function union<PA extends ModelProperties, OA, FCA, FSA, PB extends ModelProperties, OB, FCB, FSB, PC extends ModelProperties, OC, FCC, FSC, PD extends ModelProperties, OD, FCD, FSD, PE extends ModelProperties, OE, FCE, FSE>(A: IModelType<PA, OA, FCA, FSA>, B: IModelType<PB, OB, FCB, FSB>, C: IModelType<PC, OC, FCC, FSC>, D: IModelType<PD, OD, FCD, FSD>, E: IModelType<PE, OE, FCE, FSE>): ITypeUnion<ModelCreationType2<PA, FCA> | ModelCreationType2<PB, FCB> | ModelCreationType2<PC, FCC> | ModelCreationType2<PD, FCD> | ModelCreationType2<PE, FCE>, ModelSnapshotType2<PA, FSA> | ModelSnapshotType2<PB, FSB> | ModelSnapshotType2<PC, FSC> | ModelSnapshotType2<PD, FSD> | ModelSnapshotType2<PE, FSE>, ModelInstanceType<PA, OA, FCA, FSA> | ModelInstanceType<PB, OB, FCB, FSB> | ModelInstanceType<PC, OC, FCC, FSC> | ModelInstanceType<PD, OD, FCD, FSD> | ModelInstanceType<PE, OE, FCE, FSE>>;
export declare function union<PA extends ModelProperties, OA, FCA, FSA, PB extends ModelProperties, OB, FCB, FSB, PC extends ModelProperties, OC, FCC, FSC, PD extends ModelProperties, OD, FCD, FSD, PE extends ModelProperties, OE, FCE, FSE>(options: UnionOptions, A: IModelType<PA, OA, FCA, FSA>, B: IModelType<PB, OB, FCB, FSB>, C: IModelType<PC, OC, FCC, FSC>, D: IModelType<PD, OD, FCD, FSD>, E: IModelType<PE, OE, FCE, FSE>): ITypeUnion<ModelCreationType2<PA, FCA> | ModelCreationType2<PB, FCB> | ModelCreationType2<PC, FCC> | ModelCreationType2<PD, FCD> | ModelCreationType2<PE, FCE>, ModelSnapshotType2<PA, FSA> | ModelSnapshotType2<PB, FSB> | ModelSnapshotType2<PC, FSC> | ModelSnapshotType2<PD, FSD> | ModelSnapshotType2<PE, FSE>, ModelInstanceType<PA, OA, FCA, FSA> | ModelInstanceType<PB, OB, FCB, FSB> | ModelInstanceType<PC, OC, FCC, FSC> | ModelInstanceType<PD, OD, FCD, FSD> | ModelInstanceType<PE, OE, FCE, FSE>>;
export declare function union<PA extends ModelProperties, OA, FCA, FSA, PB extends ModelProperties, OB, FCB, FSB, PC extends ModelProperties, OC, FCC, FSC, PD extends ModelProperties, OD, FCD, FSD, PE extends ModelProperties, OE, FCE, FSE, PF extends ModelProperties, OF, FCF, FSF>(A: IModelType<PA, OA, FCA, FSA>, B: IModelType<PB, OB, FCB, FSB>, C: IModelType<PC, OC, FCC, FSC>, D: IModelType<PD, OD, FCD, FSD>, E: IModelType<PE, OE, FCE, FSE>, F: IModelType<PF, OF, FCF, FSF>): ITypeUnion<ModelCreationType2<PA, FCA> | ModelCreationType2<PB, FCB> | ModelCreationType2<PC, FCC> | ModelCreationType2<PD, FCD> | ModelCreationType2<PE, FCE> | ModelCreationType2<PF, FCF>, ModelSnapshotType2<PA, FSA> | ModelSnapshotType2<PB, FSB> | ModelSnapshotType2<PC, FSC> | ModelSnapshotType2<PD, FSD> | ModelSnapshotType2<PE, FSE> | ModelSnapshotType2<PF, FSF>, ModelInstanceType<PA, OA, FCA, FSA> | ModelInstanceType<PB, OB, FCB, FSB> | ModelInstanceType<PC, OC, FCC, FSC> | ModelInstanceType<PD, OD, FCD, FSD> | ModelInstanceType<PE, OE, FCE, FSE> | ModelInstanceType<PF, OF, FCF, FSF>>;
export declare function union<PA extends ModelProperties, OA, FCA, FSA, PB extends ModelProperties, OB, FCB, FSB, PC extends ModelProperties, OC, FCC, FSC, PD extends ModelProperties, OD, FCD, FSD, PE extends ModelProperties, OE, FCE, FSE, PF extends ModelProperties, OF, FCF, FSF>(options: UnionOptions, A: IModelType<PA, OA, FCA, FSA>, B: IModelType<PB, OB, FCB, FSB>, C: IModelType<PC, OC, FCC, FSC>, D: IModelType<PD, OD, FCD, FSD>, E: IModelType<PE, OE, FCE, FSE>, F: IModelType<PF, OF, FCF, FSF>): ITypeUnion<ModelCreationType2<PA, FCA> | ModelCreationType2<PB, FCB> | ModelCreationType2<PC, FCC> | ModelCreationType2<PD, FCD> | ModelCreationType2<PE, FCE> | ModelCreationType2<PF, FCF>, ModelSnapshotType2<PA, FSA> | ModelSnapshotType2<PB, FSB> | ModelSnapshotType2<PC, FSC> | ModelSnapshotType2<PD, FSD> | ModelSnapshotType2<PE, FSE> | ModelSnapshotType2<PF, FSF>, ModelInstanceType<PA, OA, FCA, FSA> | ModelInstanceType<PB, OB, FCB, FSB> | ModelInstanceType<PC, OC, FCC, FSC> | ModelInstanceType<PD, OD, FCD, FSD> | ModelInstanceType<PE, OE, FCE, FSE> | ModelInstanceType<PF, OF, FCF, FSF>>;
export declare function union<PA extends ModelProperties, OA, FCA, FSA, PB extends ModelProperties, OB, FCB, FSB, PC extends ModelProperties, OC, FCC, FSC, PD extends ModelProperties, OD, FCD, FSD, PE extends ModelProperties, OE, FCE, FSE, PF extends ModelProperties, OF, FCF, FSF, PG extends ModelProperties, OG, FCG, FSG>(A: IModelType<PA, OA, FCA, FSA>, B: IModelType<PB, OB, FCB, FSB>, C: IModelType<PC, OC, FCC, FSC>, D: IModelType<PD, OD, FCD, FSD>, E: IModelType<PE, OE, FCE, FSE>, F: IModelType<PF, OF, FCF, FSF>, G: IModelType<PG, OG, FCG, FSG>): ITypeUnion<ModelCreationType2<PA, FCA> | ModelCreationType2<PB, FCB> | ModelCreationType2<PC, FCC> | ModelCreationType2<PD, FCD> | ModelCreationType2<PE, FCE> | ModelCreationType2<PF, FCF> | ModelCreationType2<PG, FCG>, ModelSnapshotType2<PA, FSA> | ModelSnapshotType2<PB, FSB> | ModelSnapshotType2<PC, FSC> | ModelSnapshotType2<PD, FSD> | ModelSnapshotType2<PE, FSE> | ModelSnapshotType2<PF, FSF> | ModelSnapshotType2<PG, FSG>, ModelInstanceType<PA, OA, FCA, FSA> | ModelInstanceType<PB, OB, FCB, FSB> | ModelInstanceType<PC, OC, FCC, FSC> | ModelInstanceType<PD, OD, FCD, FSD> | ModelInstanceType<PE, OE, FCE, FSE> | ModelInstanceType<PF, OF, FCF, FSF> | ModelInstanceType<PG, OG, FCG, FSG>>;
export declare function union<PA extends ModelProperties, OA, FCA, FSA, PB extends ModelProperties, OB, FCB, FSB, PC extends ModelProperties, OC, FCC, FSC, PD extends ModelProperties, OD, FCD, FSD, PE extends ModelProperties, OE, FCE, FSE, PF extends ModelProperties, OF, FCF, FSF, PG extends ModelProperties, OG, FCG, FSG>(options: UnionOptions, A: IModelType<PA, OA, FCA, FSA>, B: IModelType<PB, OB, FCB, FSB>, C: IModelType<PC, OC, FCC, FSC>, D: IModelType<PD, OD, FCD, FSD>, E: IModelType<PE, OE, FCE, FSE>, F: IModelType<PF, OF, FCF, FSF>, G: IModelType<PG, OG, FCG, FSG>): ITypeUnion<ModelCreationType2<PA, FCA> | ModelCreationType2<PB, FCB> | ModelCreationType2<PC, FCC> | ModelCreationType2<PD, FCD> | ModelCreationType2<PE, FCE> | ModelCreationType2<PF, FCF> | ModelCreationType2<PG, FCG>, ModelSnapshotType2<PA, FSA> | ModelSnapshotType2<PB, FSB> | ModelSnapshotType2<PC, FSC> | ModelSnapshotType2<PD, FSD> | ModelSnapshotType2<PE, FSE> | ModelSnapshotType2<PF, FSF> | ModelSnapshotType2<PG, FSG>, ModelInstanceType<PA, OA, FCA, FSA> | ModelInstanceType<PB, OB, FCB, FSB> | ModelInstanceType<PC, OC, FCC, FSC> | ModelInstanceType<PD, OD, FCD, FSD> | ModelInstanceType<PE, OE, FCE, FSE> | ModelInstanceType<PF, OF, FCF, FSF> | ModelInstanceType<PG, OG, FCG, FSG>>;
export declare function union<PA extends ModelProperties, OA, FCA, FSA, PB extends ModelProperties, OB, FCB, FSB, PC extends ModelProperties, OC, FCC, FSC, PD extends ModelProperties, OD, FCD, FSD, PE extends ModelProperties, OE, FCE, FSE, PF extends ModelProperties, OF, FCF, FSF, PG extends ModelProperties, OG, FCG, FSG, PH extends ModelProperties, OH, FCH, FSH>(A: IModelType<PA, OA, FCA, FSA>, B: IModelType<PB, OB, FCB, FSB>, C: IModelType<PC, OC, FCC, FSC>, D: IModelType<PD, OD, FCD, FSD>, E: IModelType<PE, OE, FCE, FSE>, F: IModelType<PF, OF, FCF, FSF>, G: IModelType<PG, OG, FCG, FSG>, H: IModelType<PH, OH, FCH, FSH>): ITypeUnion<ModelCreationType2<PA, FCA> | ModelCreationType2<PB, FCB> | ModelCreationType2<PC, FCC> | ModelCreationType2<PD, FCD> | ModelCreationType2<PE, FCE> | ModelCreationType2<PF, FCF> | ModelCreationType2<PG, FCG> | ModelCreationType2<PH, FCH>, ModelSnapshotType2<PA, FSA> | ModelSnapshotType2<PB, FSB> | ModelSnapshotType2<PC, FSC> | ModelSnapshotType2<PD, FSD> | ModelSnapshotType2<PE, FSE> | ModelSnapshotType2<PF, FSF> | ModelSnapshotType2<PG, FSG> | ModelSnapshotType2<PH, FSH>, ModelInstanceType<PA, OA, FCA, FSA> | ModelInstanceType<PB, OB, FCB, FSB> | ModelInstanceType<PC, OC, FCC, FSC> | ModelInstanceType<PD, OD, FCD, FSD> | ModelInstanceType<PE, OE, FCE, FSE> | ModelInstanceType<PF, OF, FCF, FSF> | ModelInstanceType<PG, OG, FCG, FSG> | ModelInstanceType<PH, OH, FCH, FSH>>;
export declare function union<PA extends ModelProperties, OA, FCA, FSA, PB extends ModelProperties, OB, FCB, FSB, PC extends ModelProperties, OC, FCC, FSC, PD extends ModelProperties, OD, FCD, FSD, PE extends ModelProperties, OE, FCE, FSE, PF extends ModelProperties, OF, FCF, FSF, PG extends ModelProperties, OG, FCG, FSG, PH extends ModelProperties, OH, FCH, FSH>(options: UnionOptions, A: IModelType<PA, OA, FCA, FSA>, B: IModelType<PB, OB, FCB, FSB>, C: IModelType<PC, OC, FCC, FSC>, D: IModelType<PD, OD, FCD, FSD>, E: IModelType<PE, OE, FCE, FSE>, F: IModelType<PF, OF, FCF, FSF>, G: IModelType<PG, OG, FCG, FSG>, H: IModelType<PH, OH, FCH, FSH>): ITypeUnion<ModelCreationType2<PA, FCA> | ModelCreationType2<PB, FCB> | ModelCreationType2<PC, FCC> | ModelCreationType2<PD, FCD> | ModelCreationType2<PE, FCE> | ModelCreationType2<PF, FCF> | ModelCreationType2<PG, FCG> | ModelCreationType2<PH, FCH>, ModelSnapshotType2<PA, FSA> | ModelSnapshotType2<PB, FSB> | ModelSnapshotType2<PC, FSC> | ModelSnapshotType2<PD, FSD> | ModelSnapshotType2<PE, FSE> | ModelSnapshotType2<PF, FSF> | ModelSnapshotType2<PG, FSG> | ModelSnapshotType2<PH, FSH>, ModelInstanceType<PA, OA, FCA, FSA> | ModelInstanceType<PB, OB, FCB, FSB> | ModelInstanceType<PC, OC, FCC, FSC> | ModelInstanceType<PD, OD, FCD, FSD> | ModelInstanceType<PE, OE, FCE, FSE> | ModelInstanceType<PF, OF, FCF, FSF> | ModelInstanceType<PG, OG, FCG, FSG> | ModelInstanceType<PH, OH, FCH, FSH>>;
export declare function union<PA extends ModelProperties, OA, FCA, FSA, PB extends ModelProperties, OB, FCB, FSB, PC extends ModelProperties, OC, FCC, FSC, PD extends ModelProperties, OD, FCD, FSD, PE extends ModelProperties, OE, FCE, FSE, PF extends ModelProperties, OF, FCF, FSF, PG extends ModelProperties, OG, FCG, FSG, PH extends ModelProperties, OH, FCH, FSH, PI extends ModelProperties, OI, FCI, FSI>(A: IModelType<PA, OA, FCA, FSA>, B: IModelType<PB, OB, FCB, FSB>, C: IModelType<PC, OC, FCC, FSC>, D: IModelType<PD, OD, FCD, FSD>, E: IModelType<PE, OE, FCE, FSE>, F: IModelType<PF, OF, FCF, FSF>, G: IModelType<PG, OG, FCG, FSG>, H: IModelType<PH, OH, FCH, FSH>, I: IModelType<PI, OI, FCI, FSI>): ITypeUnion<ModelCreationType2<PA, FCA> | ModelCreationType2<PB, FCB> | ModelCreationType2<PC, FCC> | ModelCreationType2<PD, FCD> | ModelCreationType2<PE, FCE> | ModelCreationType2<PF, FCF> | ModelCreationType2<PG, FCG> | ModelCreationType2<PH, FCH> | ModelCreationType2<PI, FCI>, ModelSnapshotType2<PA, FSA> | ModelSnapshotType2<PB, FSB> | ModelSnapshotType2<PC, FSC> | ModelSnapshotType2<PD, FSD> | ModelSnapshotType2<PE, FSE> | ModelSnapshotType2<PF, FSF> | ModelSnapshotType2<PG, FSG> | ModelSnapshotType2<PH, FSH> | ModelSnapshotType2<PI, FSI>, ModelInstanceType<PA, OA, FCA, FSA> | ModelInstanceType<PB, OB, FCB, FSB> | ModelInstanceType<PC, OC, FCC, FSC> | ModelInstanceType<PD, OD, FCD, FSD> | ModelInstanceType<PE, OE, FCE, FSE> | ModelInstanceType<PF, OF, FCF, FSF> | ModelInstanceType<PG, OG, FCG, FSG> | ModelInstanceType<PH, OH, FCH, FSH> | ModelInstanceType<PI, OI, FCI, FSI>>;
export declare function union<PA extends ModelProperties, OA, FCA, FSA, PB extends ModelProperties, OB, FCB, FSB, PC extends ModelProperties, OC, FCC, FSC, PD extends ModelProperties, OD, FCD, FSD, PE extends ModelProperties, OE, FCE, FSE, PF extends ModelProperties, OF, FCF, FSF, PG extends ModelProperties, OG, FCG, FSG, PH extends ModelProperties, OH, FCH, FSH, PI extends ModelProperties, OI, FCI, FSI>(options: UnionOptions, A: IModelType<PA, OA, FCA, FSA>, B: IModelType<PB, OB, FCB, FSB>, C: IModelType<PC, OC, FCC, FSC>, D: IModelType<PD, OD, FCD, FSD>, E: IModelType<PE, OE, FCE, FSE>, F: IModelType<PF, OF, FCF, FSF>, G: IModelType<PG, OG, FCG, FSG>, H: IModelType<PH, OH, FCH, FSH>, I: IModelType<PI, OI, FCI, FSI>): ITypeUnion<ModelCreationType2<PA, FCA> | ModelCreationType2<PB, FCB> | ModelCreationType2<PC, FCC> | ModelCreationType2<PD, FCD> | ModelCreationType2<PE, FCE> | ModelCreationType2<PF, FCF> | ModelCreationType2<PG, FCG> | ModelCreationType2<PH, FCH> | ModelCreationType2<PI, FCI>, ModelSnapshotType2<PA, FSA> | ModelSnapshotType2<PB, FSB> | ModelSnapshotType2<PC, FSC> | ModelSnapshotType2<PD, FSD> | ModelSnapshotType2<PE, FSE> | ModelSnapshotType2<PF, FSF> | ModelSnapshotType2<PG, FSG> | ModelSnapshotType2<PH, FSH> | ModelSnapshotType2<PI, FSI>, ModelInstanceType<PA, OA, FCA, FSA> | ModelInstanceType<PB, OB, FCB, FSB> | ModelInstanceType<PC, OC, FCC, FSC> | ModelInstanceType<PD, OD, FCD, FSD> | ModelInstanceType<PE, OE, FCE, FSE> | ModelInstanceType<PF, OF, FCF, FSF> | ModelInstanceType<PG, OG, FCG, FSG> | ModelInstanceType<PH, OH, FCH, FSH> | ModelInstanceType<PI, OI, FCI, FSI>>;
export declare function union<PA extends ModelProperties, OA, FCA, FSA, PB extends ModelProperties, OB, FCB, FSB>(A: IModelType<PA, OA, FCA, FSA>, B: IModelType<PB, OB, FCB, FSB>): ITypeUnion<ModelCreationType2<PA, FCA> | ModelCreationType2<PB, FCB>, ModelSnapshotType2<PA, FSA> | ModelSnapshotType2<PB, FSB>, ModelInstanceType<PA, OA> | ModelInstanceType<PB, OB>>;
export declare function union<PA extends ModelProperties, OA, FCA, FSA, PB extends ModelProperties, OB, FCB, FSB>(options: UnionOptions, A: IModelType<PA, OA, FCA, FSA>, B: IModelType<PB, OB, FCB, FSB>): ITypeUnion<ModelCreationType2<PA, FCA> | ModelCreationType2<PB, FCB>, ModelSnapshotType2<PA, FSA> | ModelSnapshotType2<PB, FSB>, ModelInstanceType<PA, OA> | ModelInstanceType<PB, OB>>;
export declare function union<PA extends ModelProperties, OA, FCA, FSA, PB extends ModelProperties, OB, FCB, FSB, PC extends ModelProperties, OC, FCC, FSC>(A: IModelType<PA, OA, FCA, FSA>, B: IModelType<PB, OB, FCB, FSB>, C: IModelType<PC, OC, FCC, FSC>): ITypeUnion<ModelCreationType2<PA, FCA> | ModelCreationType2<PB, FCB> | ModelCreationType2<PC, FCC>, ModelSnapshotType2<PA, FSA> | ModelSnapshotType2<PB, FSB> | ModelSnapshotType2<PC, FSC>, ModelInstanceType<PA, OA> | ModelInstanceType<PB, OB> | ModelInstanceType<PC, OC>>;
export declare function union<PA extends ModelProperties, OA, FCA, FSA, PB extends ModelProperties, OB, FCB, FSB, PC extends ModelProperties, OC, FCC, FSC>(options: UnionOptions, A: IModelType<PA, OA, FCA, FSA>, B: IModelType<PB, OB, FCB, FSB>, C: IModelType<PC, OC, FCC, FSC>): ITypeUnion<ModelCreationType2<PA, FCA> | ModelCreationType2<PB, FCB> | ModelCreationType2<PC, FCC>, ModelSnapshotType2<PA, FSA> | ModelSnapshotType2<PB, FSB> | ModelSnapshotType2<PC, FSC>, ModelInstanceType<PA, OA> | ModelInstanceType<PB, OB> | ModelInstanceType<PC, OC>>;
export declare function union<PA extends ModelProperties, OA, FCA, FSA, PB extends ModelProperties, OB, FCB, FSB, PC extends ModelProperties, OC, FCC, FSC, PD extends ModelProperties, OD, FCD, FSD>(A: IModelType<PA, OA, FCA, FSA>, B: IModelType<PB, OB, FCB, FSB>, C: IModelType<PC, OC, FCC, FSC>, D: IModelType<PD, OD, FCD, FSD>): ITypeUnion<ModelCreationType2<PA, FCA> | ModelCreationType2<PB, FCB> | ModelCreationType2<PC, FCC> | ModelCreationType2<PD, FCD>, ModelSnapshotType2<PA, FSA> | ModelSnapshotType2<PB, FSB> | ModelSnapshotType2<PC, FSC> | ModelSnapshotType2<PD, FSD>, ModelInstanceType<PA, OA> | ModelInstanceType<PB, OB> | ModelInstanceType<PC, OC> | ModelInstanceType<PD, OD>>;
export declare function union<PA extends ModelProperties, OA, FCA, FSA, PB extends ModelProperties, OB, FCB, FSB, PC extends ModelProperties, OC, FCC, FSC, PD extends ModelProperties, OD, FCD, FSD>(options: UnionOptions, A: IModelType<PA, OA, FCA, FSA>, B: IModelType<PB, OB, FCB, FSB>, C: IModelType<PC, OC, FCC, FSC>, D: IModelType<PD, OD, FCD, FSD>): ITypeUnion<ModelCreationType2<PA, FCA> | ModelCreationType2<PB, FCB> | ModelCreationType2<PC, FCC> | ModelCreationType2<PD, FCD>, ModelSnapshotType2<PA, FSA> | ModelSnapshotType2<PB, FSB> | ModelSnapshotType2<PC, FSC> | ModelSnapshotType2<PD, FSD>, ModelInstanceType<PA, OA> | ModelInstanceType<PB, OB> | ModelInstanceType<PC, OC> | ModelInstanceType<PD, OD>>;
export declare function union<PA extends ModelProperties, OA, FCA, FSA, PB extends ModelProperties, OB, FCB, FSB, PC extends ModelProperties, OC, FCC, FSC, PD extends ModelProperties, OD, FCD, FSD, PE extends ModelProperties, OE, FCE, FSE>(A: IModelType<PA, OA, FCA, FSA>, B: IModelType<PB, OB, FCB, FSB>, C: IModelType<PC, OC, FCC, FSC>, D: IModelType<PD, OD, FCD, FSD>, E: IModelType<PE, OE, FCE, FSE>): ITypeUnion<ModelCreationType2<PA, FCA> | ModelCreationType2<PB, FCB> | ModelCreationType2<PC, FCC> | ModelCreationType2<PD, FCD> | ModelCreationType2<PE, FCE>, ModelSnapshotType2<PA, FSA> | ModelSnapshotType2<PB, FSB> | ModelSnapshotType2<PC, FSC> | ModelSnapshotType2<PD, FSD> | ModelSnapshotType2<PE, FSE>, ModelInstanceType<PA, OA> | ModelInstanceType<PB, OB> | ModelInstanceType<PC, OC> | ModelInstanceType<PD, OD> | ModelInstanceType<PE, OE>>;
export declare function union<PA extends ModelProperties, OA, FCA, FSA, PB extends ModelProperties, OB, FCB, FSB, PC extends ModelProperties, OC, FCC, FSC, PD extends ModelProperties, OD, FCD, FSD, PE extends ModelProperties, OE, FCE, FSE>(options: UnionOptions, A: IModelType<PA, OA, FCA, FSA>, B: IModelType<PB, OB, FCB, FSB>, C: IModelType<PC, OC, FCC, FSC>, D: IModelType<PD, OD, FCD, FSD>, E: IModelType<PE, OE, FCE, FSE>): ITypeUnion<ModelCreationType2<PA, FCA> | ModelCreationType2<PB, FCB> | ModelCreationType2<PC, FCC> | ModelCreationType2<PD, FCD> | ModelCreationType2<PE, FCE>, ModelSnapshotType2<PA, FSA> | ModelSnapshotType2<PB, FSB> | ModelSnapshotType2<PC, FSC> | ModelSnapshotType2<PD, FSD> | ModelSnapshotType2<PE, FSE>, ModelInstanceType<PA, OA> | ModelInstanceType<PB, OB> | ModelInstanceType<PC, OC> | ModelInstanceType<PD, OD> | ModelInstanceType<PE, OE>>;
export declare function union<PA extends ModelProperties, OA, FCA, FSA, PB extends ModelProperties, OB, FCB, FSB, PC extends ModelProperties, OC, FCC, FSC, PD extends ModelProperties, OD, FCD, FSD, PE extends ModelProperties, OE, FCE, FSE, PF extends ModelProperties, OF, FCF, FSF>(A: IModelType<PA, OA, FCA, FSA>, B: IModelType<PB, OB, FCB, FSB>, C: IModelType<PC, OC, FCC, FSC>, D: IModelType<PD, OD, FCD, FSD>, E: IModelType<PE, OE, FCE, FSE>, F: IModelType<PF, OF, FCF, FSF>): ITypeUnion<ModelCreationType2<PA, FCA> | ModelCreationType2<PB, FCB> | ModelCreationType2<PC, FCC> | ModelCreationType2<PD, FCD> | ModelCreationType2<PE, FCE> | ModelCreationType2<PF, FCF>, ModelSnapshotType2<PA, FSA> | ModelSnapshotType2<PB, FSB> | ModelSnapshotType2<PC, FSC> | ModelSnapshotType2<PD, FSD> | ModelSnapshotType2<PE, FSE> | ModelSnapshotType2<PF, FSF>, ModelInstanceType<PA, OA> | ModelInstanceType<PB, OB> | ModelInstanceType<PC, OC> | ModelInstanceType<PD, OD> | ModelInstanceType<PE, OE> | ModelInstanceType<PF, OF>>;
export declare function union<PA extends ModelProperties, OA, FCA, FSA, PB extends ModelProperties, OB, FCB, FSB, PC extends ModelProperties, OC, FCC, FSC, PD extends ModelProperties, OD, FCD, FSD, PE extends ModelProperties, OE, FCE, FSE, PF extends ModelProperties, OF, FCF, FSF>(options: UnionOptions, A: IModelType<PA, OA, FCA, FSA>, B: IModelType<PB, OB, FCB, FSB>, C: IModelType<PC, OC, FCC, FSC>, D: IModelType<PD, OD, FCD, FSD>, E: IModelType<PE, OE, FCE, FSE>, F: IModelType<PF, OF, FCF, FSF>): ITypeUnion<ModelCreationType2<PA, FCA> | ModelCreationType2<PB, FCB> | ModelCreationType2<PC, FCC> | ModelCreationType2<PD, FCD> | ModelCreationType2<PE, FCE> | ModelCreationType2<PF, FCF>, ModelSnapshotType2<PA, FSA> | ModelSnapshotType2<PB, FSB> | ModelSnapshotType2<PC, FSC> | ModelSnapshotType2<PD, FSD> | ModelSnapshotType2<PE, FSE> | ModelSnapshotType2<PF, FSF>, ModelInstanceType<PA, OA> | ModelInstanceType<PB, OB> | ModelInstanceType<PC, OC> | ModelInstanceType<PD, OD> | ModelInstanceType<PE, OE> | ModelInstanceType<PF, OF>>;
export declare function union<PA extends ModelProperties, OA, FCA, FSA, PB extends ModelProperties, OB, FCB, FSB, PC extends ModelProperties, OC, FCC, FSC, PD extends ModelProperties, OD, FCD, FSD, PE extends ModelProperties, OE, FCE, FSE, PF extends ModelProperties, OF, FCF, FSF, PG extends ModelProperties, OG, FCG, FSG>(A: IModelType<PA, OA, FCA, FSA>, B: IModelType<PB, OB, FCB, FSB>, C: IModelType<PC, OC, FCC, FSC>, D: IModelType<PD, OD, FCD, FSD>, E: IModelType<PE, OE, FCE, FSE>, F: IModelType<PF, OF, FCF, FSF>, G: IModelType<PG, OG, FCG, FSG>): ITypeUnion<ModelCreationType2<PA, FCA> | ModelCreationType2<PB, FCB> | ModelCreationType2<PC, FCC> | ModelCreationType2<PD, FCD> | ModelCreationType2<PE, FCE> | ModelCreationType2<PF, FCF> | ModelCreationType2<PG, FCG>, ModelSnapshotType2<PA, FSA> | ModelSnapshotType2<PB, FSB> | ModelSnapshotType2<PC, FSC> | ModelSnapshotType2<PD, FSD> | ModelSnapshotType2<PE, FSE> | ModelSnapshotType2<PF, FSF> | ModelSnapshotType2<PG, FSG>, ModelInstanceType<PA, OA> | ModelInstanceType<PB, OB> | ModelInstanceType<PC, OC> | ModelInstanceType<PD, OD> | ModelInstanceType<PE, OE> | ModelInstanceType<PF, OF> | ModelInstanceType<PG, OG>>;
export declare function union<PA extends ModelProperties, OA, FCA, FSA, PB extends ModelProperties, OB, FCB, FSB, PC extends ModelProperties, OC, FCC, FSC, PD extends ModelProperties, OD, FCD, FSD, PE extends ModelProperties, OE, FCE, FSE, PF extends ModelProperties, OF, FCF, FSF, PG extends ModelProperties, OG, FCG, FSG>(options: UnionOptions, A: IModelType<PA, OA, FCA, FSA>, B: IModelType<PB, OB, FCB, FSB>, C: IModelType<PC, OC, FCC, FSC>, D: IModelType<PD, OD, FCD, FSD>, E: IModelType<PE, OE, FCE, FSE>, F: IModelType<PF, OF, FCF, FSF>, G: IModelType<PG, OG, FCG, FSG>): ITypeUnion<ModelCreationType2<PA, FCA> | ModelCreationType2<PB, FCB> | ModelCreationType2<PC, FCC> | ModelCreationType2<PD, FCD> | ModelCreationType2<PE, FCE> | ModelCreationType2<PF, FCF> | ModelCreationType2<PG, FCG>, ModelSnapshotType2<PA, FSA> | ModelSnapshotType2<PB, FSB> | ModelSnapshotType2<PC, FSC> | ModelSnapshotType2<PD, FSD> | ModelSnapshotType2<PE, FSE> | ModelSnapshotType2<PF, FSF> | ModelSnapshotType2<PG, FSG>, ModelInstanceType<PA, OA> | ModelInstanceType<PB, OB> | ModelInstanceType<PC, OC> | ModelInstanceType<PD, OD> | ModelInstanceType<PE, OE> | ModelInstanceType<PF, OF> | ModelInstanceType<PG, OG>>;
export declare function union<PA extends ModelProperties, OA, FCA, FSA, PB extends ModelProperties, OB, FCB, FSB, PC extends ModelProperties, OC, FCC, FSC, PD extends ModelProperties, OD, FCD, FSD, PE extends ModelProperties, OE, FCE, FSE, PF extends ModelProperties, OF, FCF, FSF, PG extends ModelProperties, OG, FCG, FSG, PH extends ModelProperties, OH, FCH, FSH>(A: IModelType<PA, OA, FCA, FSA>, B: IModelType<PB, OB, FCB, FSB>, C: IModelType<PC, OC, FCC, FSC>, D: IModelType<PD, OD, FCD, FSD>, E: IModelType<PE, OE, FCE, FSE>, F: IModelType<PF, OF, FCF, FSF>, G: IModelType<PG, OG, FCG, FSG>, H: IModelType<PH, OH, FCH, FSH>): ITypeUnion<ModelCreationType2<PA, FCA> | ModelCreationType2<PB, FCB> | ModelCreationType2<PC, FCC> | ModelCreationType2<PD, FCD> | ModelCreationType2<PE, FCE> | ModelCreationType2<PF, FCF> | ModelCreationType2<PG, FCG> | ModelCreationType2<PH, FCH>, ModelSnapshotType2<PA, FSA> | ModelSnapshotType2<PB, FSB> | ModelSnapshotType2<PC, FSC> | ModelSnapshotType2<PD, FSD> | ModelSnapshotType2<PE, FSE> | ModelSnapshotType2<PF, FSF> | ModelSnapshotType2<PG, FSG> | ModelSnapshotType2<PH, FSH>, ModelInstanceType<PA, OA> | ModelInstanceType<PB, OB> | ModelInstanceType<PC, OC> | ModelInstanceType<PD, OD> | ModelInstanceType<PE, OE> | ModelInstanceType<PF, OF> | ModelInstanceType<PG, OG> | ModelInstanceType<PH, OH>>;
export declare function union<PA extends ModelProperties, OA, FCA, FSA, PB extends ModelProperties, OB, FCB, FSB, PC extends ModelProperties, OC, FCC, FSC, PD extends ModelProperties, OD, FCD, FSD, PE extends ModelProperties, OE, FCE, FSE, PF extends ModelProperties, OF, FCF, FSF, PG extends ModelProperties, OG, FCG, FSG, PH extends ModelProperties, OH, FCH, FSH>(options: UnionOptions, A: IModelType<PA, OA, FCA, FSA>, B: IModelType<PB, OB, FCB, FSB>, C: IModelType<PC, OC, FCC, FSC>, D: IModelType<PD, OD, FCD, FSD>, E: IModelType<PE, OE, FCE, FSE>, F: IModelType<PF, OF, FCF, FSF>, G: IModelType<PG, OG, FCG, FSG>, H: IModelType<PH, OH, FCH, FSH>): ITypeUnion<ModelCreationType2<PA, FCA> | ModelCreationType2<PB, FCB> | ModelCreationType2<PC, FCC> | ModelCreationType2<PD, FCD> | ModelCreationType2<PE, FCE> | ModelCreationType2<PF, FCF> | ModelCreationType2<PG, FCG> | ModelCreationType2<PH, FCH>, ModelSnapshotType2<PA, FSA> | ModelSnapshotType2<PB, FSB> | ModelSnapshotType2<PC, FSC> | ModelSnapshotType2<PD, FSD> | ModelSnapshotType2<PE, FSE> | ModelSnapshotType2<PF, FSF> | ModelSnapshotType2<PG, FSG> | ModelSnapshotType2<PH, FSH>, ModelInstanceType<PA, OA> | ModelInstanceType<PB, OB> | ModelInstanceType<PC, OC> | ModelInstanceType<PD, OD> | ModelInstanceType<PE, OE> | ModelInstanceType<PF, OF> | ModelInstanceType<PG, OG> | ModelInstanceType<PH, OH>>;
export declare function union<PA extends ModelProperties, OA, FCA, FSA, PB extends ModelProperties, OB, FCB, FSB, PC extends ModelProperties, OC, FCC, FSC, PD extends ModelProperties, OD, FCD, FSD, PE extends ModelProperties, OE, FCE, FSE, PF extends ModelProperties, OF, FCF, FSF, PG extends ModelProperties, OG, FCG, FSG, PH extends ModelProperties, OH, FCH, FSH, PI extends ModelProperties, OI, FCI, FSI>(A: IModelType<PA, OA, FCA, FSA>, B: IModelType<PB, OB, FCB, FSB>, C: IModelType<PC, OC, FCC, FSC>, D: IModelType<PD, OD, FCD, FSD>, E: IModelType<PE, OE, FCE, FSE>, F: IModelType<PF, OF, FCF, FSF>, G: IModelType<PG, OG, FCG, FSG>, H: IModelType<PH, OH, FCH, FSH>, I: IModelType<PI, OI, FCI, FSI>): ITypeUnion<ModelCreationType2<PA, FCA> | ModelCreationType2<PB, FCB> | ModelCreationType2<PC, FCC> | ModelCreationType2<PD, FCD> | ModelCreationType2<PE, FCE> | ModelCreationType2<PF, FCF> | ModelCreationType2<PG, FCG> | ModelCreationType2<PH, FCH> | ModelCreationType2<PI, FCI>, ModelSnapshotType2<PA, FSA> | ModelSnapshotType2<PB, FSB> | ModelSnapshotType2<PC, FSC> | ModelSnapshotType2<PD, FSD> | ModelSnapshotType2<PE, FSE> | ModelSnapshotType2<PF, FSF> | ModelSnapshotType2<PG, FSG> | ModelSnapshotType2<PH, FSH> | ModelSnapshotType2<PI, FSI>, ModelInstanceType<PA, OA> | ModelInstanceType<PB, OB> | ModelInstanceType<PC, OC> | ModelInstanceType<PD, OD> | ModelInstanceType<PE, OE> | ModelInstanceType<PF, OF> | ModelInstanceType<PG, OG> | ModelInstanceType<PH, OH> | ModelInstanceType<PI, OI>>;
export declare function union<PA extends ModelProperties, OA, FCA, FSA, PB extends ModelProperties, OB, FCB, FSB, PC extends ModelProperties, OC, FCC, FSC, PD extends ModelProperties, OD, FCD, FSD, PE extends ModelProperties, OE, FCE, FSE, PF extends ModelProperties, OF, FCF, FSF, PG extends ModelProperties, OG, FCG, FSG, PH extends ModelProperties, OH, FCH, FSH, PI extends ModelProperties, OI, FCI, FSI>(options: UnionOptions, A: IModelType<PA, OA, FCA, FSA>, B: IModelType<PB, OB, FCB, FSB>, C: IModelType<PC, OC, FCC, FSC>, D: IModelType<PD, OD, FCD, FSD>, E: IModelType<PE, OE, FCE, FSE>, F: IModelType<PF, OF, FCF, FSF>, G: IModelType<PG, OG, FCG, FSG>, H: IModelType<PH, OH, FCH, FSH>, I: IModelType<PI, OI, FCI, FSI>): ITypeUnion<ModelCreationType2<PA, FCA> | ModelCreationType2<PB, FCB> | ModelCreationType2<PC, FCC> | ModelCreationType2<PD, FCD> | ModelCreationType2<PE, FCE> | ModelCreationType2<PF, FCF> | ModelCreationType2<PG, FCG> | ModelCreationType2<PH, FCH> | ModelCreationType2<PI, FCI>, ModelSnapshotType2<PA, FSA> | ModelSnapshotType2<PB, FSB> | ModelSnapshotType2<PC, FSC> | ModelSnapshotType2<PD, FSD> | ModelSnapshotType2<PE, FSE> | ModelSnapshotType2<PF, FSF> | ModelSnapshotType2<PG, FSG> | ModelSnapshotType2<PH, FSH> | ModelSnapshotType2<PI, FSI>, ModelInstanceType<PA, OA> | ModelInstanceType<PB, OB> | ModelInstanceType<PC, OC> | ModelInstanceType<PD, OD> | ModelInstanceType<PE, OE> | ModelInstanceType<PF, OF> | ModelInstanceType<PG, OG> | ModelInstanceType<PH, OH> | ModelInstanceType<PI, OI>>;
export declare function union<CA, SA, TA, CB, SB, TB>(A: IType<CA, SA, TA>, B: IType<CB, SB, TB>): ITypeUnion<CA | CB, SA | SB, TA | TB>;

@@ -33,0 +33,0 @@ export declare function union<CA, SA, TA, CB, SB, TB>(options: UnionOptions, A: IType<CA, SA, TA>, B: IType<CB, SB, TB>): ITypeUnion<CA | CB, SA | SB, TA | TB>;

{
"name": "@builder.io/mobx-state-tree",
"version": "3.10.2",
"description": "Opinionated, transactional, MobX powered state container",
"main": "dist/mobx-state-tree.js",
"umd:main": "dist/mobx-state-tree.umd.js",
"module": "dist/mobx-state-tree.module.js",
"typings": "dist/index.d.ts",
"scripts": {
"build": "shx cp ../../README.md . && tsc && cpr lib dist --delete-first --filter=\\\\.js && yarn rollup",
"rollup": "rollup -c",
"jest": "jest --testPathPattern=/__tests__/core/",
"jest:perf": "jest --testPathPattern=/__tests__/perf/",
"test": "cross-env NODE_ENV=development yarn jest --ci && cross-env NODE_ENV=production yarn jest --ci && yarn run test:cyclic && yarn run test:mobx4",
"test:perf": "yarn build && yarn jest:perf && TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\"}' /usr/bin/time node --expose-gc --require ts-node/register __tests__/perf/report.ts",
"test:cyclic": "yarn run build && node -e \"require('.')\"",
"test:mobx4": "yarn add -D mobx@4.9.0 && yarn build && yarn jest --ci && git checkout package.json ../../yarn.lock && yarn install",
"_prepublish": "yarn run build && yarn run build-docs",
"coverage": "yarn jest --coverage",
"fix-docs": "replace --quiet \"&lt;\" \"<\" ../../docs/API/README.md && replace --quiet \"&gt;\" \">\" ../../docs/API/README.md && concat -o ../../docs/API/README.md ../../docs/API_header.md ../../docs/API/README.md",
"build-docs": "shx rm -rf ../../docs/API && typedoc --options ./typedocconfig.js && yarn fix-docs",
"lint": "tslint -c ../../tslint.json 'src/**/*.ts'"
},
"repository": {
"type": "git",
"url": "https://github.com/mobxjs/mobx-state-tree.git"
},
"author": "Michel Weststrate",
"license": "MIT",
"bugs": {
"url": "https://github.com/mobxjs/mobx-state-tree/issues"
},
"files": [
"dist/"
],
"devDependencies": {
"@types/jest": "^23.0.0",
"@types/node": "^10.0.0",
"babel-core": "^6.26.3",
"babel-jest": "^23.4.2",
"concat": "^1.0.3",
"coveralls": "^3.0.0",
"cpr": "^3.0.0",
"cross-env": "^5.1.1",
"jest": "^23.4.0",
"lerna": "^3.3.0",
"mobx": "^5.9.0",
"prettier": "^1.13.6",
"replace": "^1.0.1",
"rollup": "^1.0.0",
"rollup-plugin-commonjs": "^9.0.0",
"rollup-plugin-filesize": "^6.0.0",
"rollup-plugin-node-resolve": "^4.0.0",
"rollup-plugin-replace": "^2.0.0",
"rollup-plugin-uglify": "^6.0.0",
"shx": "^0.3.2",
"ts-jest": "^23.0.1",
"ts-node": "^8.0.0",
"tslib": "^1.7.1",
"tslint": "^5.0.0",
"typedoc": "^0.14.0",
"typedoc-plugin-markdown": "^1.1.20",
"typescript": "~3.0.0"
},
"peerDependencies": {
"mobx": ">=4.8.0 <5.0.0 || >=5.8.0 <6.0.0"
},
"keywords": [
"mobx",
"mobx-state-tree",
"promise",
"reactive",
"frp",
"functional-reactive-programming",
"state management"
]
"name": "@builder.io/mobx-state-tree",
"version": "3.14.1",
"description": "Opinionated, transactional, MobX powered state container",
"main": "dist/mobx-state-tree.js",
"umd:main": "dist/mobx-state-tree.umd.js",
"module": "dist/mobx-state-tree.module.js",
"browser": {
"./dist/mobx-state-tree.js": "./dist/mobx-state-tree.js",
"./dist/mobx-state-tree.module.js": "./dist/mobx-state-tree.module.js"
},
"unpkg": "dist/mobx-state-tree.umd.min.js",
"jsnext:main": "dist/mobx-state-tree.module.js",
"react-native": "dist/mobx-state-tree.module.js",
"typings": "dist/index.d.ts",
"scripts": {
"clean": "shx rm -rf dist && shx rm -rf lib",
"build": "yarn clean && shx cp ../../README.md . && tsc && cpr lib dist --filter=\\.js$ && rollup -c",
"jest": "jest --testPathPattern=/__tests__/core/",
"jest:perf": "jest --testPathPattern=/__tests__/perf/",
"test:perf": "yarn build && yarn jest:perf && TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\"}' /usr/bin/time node --expose-gc --require ts-node/register __tests__/perf/report.ts",
"test": "yarn test:dev && yarn test:prod && yarn test:others",
"test:dev": "cross-env NODE_ENV=development JEST_JUNIT_OUTPUT=../../test-results/mobx-state-tree/dev.xml yarn jest",
"test:prod": "cross-env NODE_ENV=production JEST_JUNIT_OUTPUT=../../test-results/mobx-state-tree/prod.xml yarn jest",
"test:others": "yarn test:cyclic && yarn test:mobx4",
"test:cyclic": "node -e \"require('.')\"",
"test:mobx4": "yarn add -D mobx@4.9.0 && cross-env JEST_JUNIT_OUTPUT=../../test-results/mobx-state-tree/mobx4.xml yarn jest -i && git checkout package.json ../../yarn.lock && yarn install",
"_prepublish": "yarn build && yarn build-docs",
"fix-docs": "concat -o ../../docs/API/README.md ../../docs/API_header.md ../../docs/API/README.md",
"build-docs": "shx rm -rf ../../docs/API && typedoc --options ./typedocconfig.js && yarn fix-docs",
"lint": "tslint -c ./tslint.json 'src/**/*.ts'"
},
"repository": {
"type": "git",
"url": "https://github.com/mobxjs/mobx-state-tree.git"
},
"author": "Michel Weststrate",
"license": "MIT",
"bugs": {
"url": "https://github.com/mobxjs/mobx-state-tree/issues"
},
"files": ["dist/"],
"devDependencies": {
"@types/jest": "^24.0.11",
"@types/node": "^12.0.2",
"concat": "^1.0.3",
"coveralls": "^3.0.3",
"cpr": "^3.0.1",
"cross-env": "^5.2.0",
"jest": "^24.5.0",
"jest-junit": "^6.3.0",
"mobx": "^5.9.0",
"rollup": "^1.6.0",
"rollup-plugin-commonjs": "^10.0.0",
"rollup-plugin-filesize": "^6.0.1",
"rollup-plugin-node-resolve": "^5.0.0",
"rollup-plugin-replace": "^2.1.0",
"rollup-plugin-terser": "^5.0.0",
"shx": "^0.3.2",
"spec.ts": "^1.1.3",
"ts-jest": "^24.0.0",
"ts-node": "^8.0.3",
"tslib": "^1.9.3",
"tslint": "^5.14.0",
"typedoc": "^0.14.2",
"typedoc-plugin-markdown": "^1.1.27",
"typescript": "^3.5.3"
},
"peerDependencies": {
"mobx": ">=4.8.0 <5.0.0 || >=5.8.0 <6.0.0"
},
"keywords": [
"mobx",
"mobx-state-tree",
"promise",
"reactive",
"frp",
"functional-reactive-programming",
"state management"
]
}

Sorry, the diff of this file is too big to display