mobx-state-tree
Advanced tools
Comparing version 3.14.0 to 3.14.1
@@ -0,0 +0,0 @@ import { IDisposer, IAnyStateTreeNode, IActionContext } from "../internal"; |
@@ -0,0 +0,0 @@ import { IAnyStateTreeNode, IMiddlewareEvent } from "../internal"; |
@@ -0,0 +0,0 @@ /** @hidden */ |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ import { IAnyStateTreeNode, IType, IAnyModelType, IStateTreeNode, IJsonPatch, IDisposer, IAnyType, ReferenceIdentifier, TypeOfValue, IActionContext } from "../internal"; |
export {}; |
export {}; |
export {}; |
export {}; |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ import { IAnyType } from "../../internal"; |
export {}; |
export {}; |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ import { IAnyType, ExtractCSTWithSTN } from "../../internal"; |
@@ -5,3 +5,3 @@ import { IValidationContext, IValidationResult, IStateTreeNode, ModelPrimitive } from "../../internal"; | ||
*/ | ||
export declare type STNValue<T, IT extends IAnyType> = (Extract<T, object> & IStateTreeNode<IT>) | Exclude<T, object>; | ||
export declare type STNValue<T, IT extends IAnyType> = T extends object ? T & IStateTreeNode<IT> : T; | ||
/** @hidden */ | ||
@@ -20,3 +20,3 @@ declare const $type: unique symbol; | ||
/** | ||
* Name of the dentifier attribute or null if none. | ||
* Name of the identifier attribute or null if none. | ||
*/ | ||
@@ -23,0 +23,0 @@ readonly identifierAttribute?: string; |
@@ -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, 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 | ||
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, 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"; |
@@ -0,0 +0,0 @@ export * from "./core/node/livelinessChecking"; |
@@ -0,0 +0,0 @@ import { IMiddlewareEvent, IMiddlewareHandler } from "../internal"; |
@@ -0,0 +0,0 @@ import { IMiddlewareHandler, IActionContext } from "../internal"; |
@@ -0,0 +0,0 @@ import { IDisposer, IAnyStateTreeNode, IActionContext } from "../internal"; |
@@ -0,0 +0,0 @@ import { IObservableArray } from "mobx"; |
@@ -0,0 +0,0 @@ import { IInterceptor, IKeyValueMap, IMapDidChange, IMapWillChange, Lambda } from "mobx"; |
@@ -23,12 +23,2 @@ import { IAnyType, IType, _CustomOrOther, _NotCustomized, Instance } from "../../internal"; | ||
/** | ||
* Checks if a type is any or unknown | ||
* @hidden | ||
*/ | ||
declare type IsAnyOrUnknown<T> = unknown extends T ? true : never; | ||
/** | ||
* Checks if a type is undefined | ||
* @hidden | ||
*/ | ||
declare type IsUndefined<T> = T extends undefined ? true : never; | ||
/** | ||
* Checks if a value is optional (undefined, any or unknown). | ||
@@ -38,10 +28,10 @@ * @hidden | ||
* Examples: | ||
* - string = never | ||
* - string = false | ||
* - undefined = true | ||
* - string | undefined = true | ||
* - string & undefined = true | ||
* - string & undefined = false, but we don't care | ||
* - any = true | ||
* - unknown = true | ||
*/ | ||
declare type IsOptionalValue<C> = IsUndefined<C> | IsAnyOrUnknown<C>; | ||
declare type IsOptionalValue<C, TV, FV> = undefined extends C ? TV : FV; | ||
/** | ||
@@ -52,3 +42,3 @@ * Name of the properties of an object that can't be set to undefined, any or unknown | ||
declare type DefinablePropsNames<T> = { | ||
[K in keyof T]: IsOptionalValue<T[K]> extends never ? K : never; | ||
[K in keyof T]: IsOptionalValue<T[K], never, K>; | ||
}[keyof T]; | ||
@@ -55,0 +45,0 @@ /** @hidden */ |
@@ -0,0 +0,0 @@ import { enumeration, model, compose, custom, reference, safeReference, union, optional, literal, maybe, maybeNull, refinement, map, array, frozen, late, snapshotProcessor } from "../internal"; |
@@ -0,0 +0,0 @@ import { ISimpleType, IType } from "../internal"; |
@@ -0,0 +0,0 @@ import { IType } from "../../internal"; |
@@ -0,0 +0,0 @@ import { ISimpleType } from "../../internal"; |
@@ -0,0 +0,0 @@ import { IType } from "../../internal"; |
@@ -0,0 +0,0 @@ import { ISimpleType } from "../../internal"; |
@@ -0,0 +0,0 @@ import { IAnyType } from "../../internal"; |
@@ -0,0 +0,0 @@ import { ISimpleType, Primitives } from "../../internal"; |
@@ -0,0 +0,0 @@ import { IType, IAnyType } from "../../internal"; |
@@ -0,0 +0,0 @@ import { IType, IAnyType, ExtractCSTWithSTN } from "../../internal"; |
@@ -36,13 +36,7 @@ import { IType, IAnyType, IAnyStateTreeNode, IAnyComplexType, IMaybe, ReferenceIdentifier, IStateTreeNode } from "../../internal"; | ||
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>>; |
@@ -0,0 +0,0 @@ import { IAnyType } from "../../internal"; |
@@ -0,0 +0,0 @@ import { IType, IAnyType } from "../../internal"; |
@@ -0,0 +0,0 @@ import { IType, IAnyType, IModelType, ModelProperties, ModelInstanceType, ModelSnapshotType2, ModelCreationType2, _NotCustomized } from "../../internal"; |
@@ -0,0 +0,0 @@ /** |
{ | ||
"name": "mobx-state-tree", | ||
"version": "3.14.0", | ||
"version": "3.14.1", | ||
"description": "Opinionated, transactional, MobX powered state container", | ||
@@ -47,3 +47,3 @@ "main": "dist/mobx-state-tree.js", | ||
"@types/jest": "^24.0.11", | ||
"@types/node": "^11.11.3", | ||
"@types/node": "^12.0.2", | ||
"concat": "^1.0.3", | ||
@@ -57,8 +57,9 @@ "coveralls": "^3.0.3", | ||
"rollup": "^1.6.0", | ||
"rollup-plugin-commonjs": "^9.2.1", | ||
"rollup-plugin-commonjs": "^10.0.0", | ||
"rollup-plugin-filesize": "^6.0.1", | ||
"rollup-plugin-node-resolve": "^4.0.1", | ||
"rollup-plugin-node-resolve": "^5.0.0", | ||
"rollup-plugin-replace": "^2.1.0", | ||
"rollup-plugin-terser": "^4.0.4", | ||
"rollup-plugin-terser": "^5.0.0", | ||
"shx": "^0.3.2", | ||
"spec.ts": "^1.1.3", | ||
"ts-jest": "^24.0.0", | ||
@@ -70,3 +71,3 @@ "ts-node": "^8.0.3", | ||
"typedoc-plugin-markdown": "^1.1.27", | ||
"typescript": "^3.3.3333" | ||
"typescript": "^3.5.3" | ||
}, | ||
@@ -84,3 +85,4 @@ "peerDependencies": { | ||
"state management" | ||
] | ||
], | ||
"gitHead": "8ef9c35db90314ceeac27d73052f01fd0f8cf9eb" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
47
21652
1760
1109976
24
13