mobx-keystone
Advanced tools
Comparing version 0.39.0 to 0.40.0
@@ -28,4 +28,4 @@ import { ActionMiddlewareDisposer } from "../action/middleware"; | ||
declare const UndoStore_base: import("../model/Model")._Model<unknown, { | ||
undoEvents: import("..").ModelProp<UndoEvent[], UndoEvent[] | null | undefined, string>; | ||
redoEvents: import("..").ModelProp<UndoEvent[], UndoEvent[] | null | undefined, string>; | ||
undoEvents: import("..").OptionalModelProp<UndoEvent[], UndoEvent[]>; | ||
redoEvents: import("..").OptionalModelProp<UndoEvent[], UndoEvent[]>; | ||
}>; | ||
@@ -32,0 +32,0 @@ /** |
@@ -5,4 +5,6 @@ import { O } from "ts-toolbelt"; | ||
import { modelIdKey, modelTypeKey } from "./metadata"; | ||
declare const dataTypeSymbol: unique symbol; | ||
declare const creationDataTypeSymbol: unique symbol; | ||
declare const propsDataTypeSymbol: unique symbol; | ||
declare const propsCreationDataTypeSymbol: unique symbol; | ||
declare const instanceDataTypeSymbol: unique symbol; | ||
declare const instanceCreationDataTypeSymbol: unique symbol; | ||
/** | ||
@@ -16,9 +18,15 @@ * Base abstract class for models. Use `Model` instead when extending. | ||
*/ | ||
export declare abstract class BaseModel<Data extends { | ||
export declare abstract class BaseModel<PropsData extends { | ||
[k: string]: any; | ||
}, CreationData extends { | ||
}, PropsCreationData extends { | ||
[k: string]: any; | ||
}> { | ||
[dataTypeSymbol]: Data; | ||
[creationDataTypeSymbol]: CreationData; | ||
}, InstanceData extends { | ||
[k: string]: any; | ||
} = PropsData, InstanceCreationData extends { | ||
[k: string]: any; | ||
} = PropsCreationData> { | ||
[propsDataTypeSymbol]: PropsData; | ||
[propsCreationDataTypeSymbol]: PropsCreationData; | ||
[instanceDataTypeSymbol]: InstanceData; | ||
[instanceCreationDataTypeSymbol]: InstanceCreationData; | ||
/** | ||
@@ -44,4 +52,5 @@ * Model type name. | ||
* Use it if one of the data properties matches one of the model properties/functions. | ||
* This also allows access to the backed values of transformed properties. | ||
*/ | ||
readonly $: Data; | ||
readonly $: PropsData; | ||
/** | ||
@@ -69,3 +78,3 @@ * Optional hook that will run once this model instance is attached to the tree of a model marked as | ||
[k: string]: any; | ||
}): SnapshotInOfObject<CreationData> & { | ||
}): SnapshotInOfObject<PropsCreationData> & { | ||
[modelTypeKey]?: string; | ||
@@ -84,3 +93,3 @@ [modelIdKey]?: string; | ||
*/ | ||
constructor(data: CreationData & { | ||
constructor(data: InstanceCreationData & { | ||
[modelIdKey]?: string; | ||
@@ -101,3 +110,3 @@ }); | ||
export interface ModelClass<M extends AnyModel> { | ||
new (initialData: ModelCreationData<M> & { | ||
new (initialData: ModelInstanceCreationData<M> & { | ||
[modelIdKey]?: string; | ||
@@ -135,10 +144,18 @@ }): M; | ||
/** | ||
* The data type of a model. | ||
* The props data type of a model. | ||
*/ | ||
export declare type ModelData<M extends AnyModel> = M["$"]; | ||
export declare type ModelPropsData<M extends AnyModel> = M["$"]; | ||
/** | ||
* The creation data type of a model. | ||
* The props creation data type of a model. | ||
*/ | ||
export declare type ModelCreationData<M extends AnyModel> = M extends BaseModel<any, infer C> ? C : never; | ||
export declare type ModelPropsCreationData<M extends AnyModel> = M extends BaseModel<any, infer PropsCreationData, any, any> ? PropsCreationData : never; | ||
/** | ||
* The instance data type of a model. | ||
*/ | ||
export declare type ModelInstanceData<M extends AnyModel> = M extends BaseModel<any, any, infer InstanceData, any> ? InstanceData : never; | ||
/** | ||
* The transformed creation data type of a model. | ||
*/ | ||
export declare type ModelInstanceCreationData<M extends AnyModel> = M extends BaseModel<any, any, any, infer InstanceCreationData> ? InstanceCreationData : never; | ||
/** | ||
* Add missing model metadata to a model creation snapshot to generate a proper model snapshot. | ||
@@ -145,0 +162,0 @@ * Usually used alongside `fromSnapshot`. |
import { O } from "ts-toolbelt"; | ||
import { AnyModel, BaseModel, ModelClass } from "./BaseModel"; | ||
import { modelIdKey, modelTypeKey } from "./metadata"; | ||
import { ModelProps, ModelPropsToCreationData, ModelPropsToData, OptionalModelProps } from "./prop"; | ||
import { ModelProps, ModelPropsToInstanceCreationData, ModelPropsToInstanceData, ModelPropsToPropsCreationData, ModelPropsToPropsData, OptionalModelProps } from "./prop"; | ||
declare const propsDataSymbol: unique symbol; | ||
declare const creationPropsDataSymbol: unique symbol; | ||
declare const optPropsDataSymbol: unique symbol; | ||
declare const creationDataSymbol: unique symbol; | ||
declare const composedCreationDataSymbol: unique symbol; | ||
declare const instanceDataSymbol: unique symbol; | ||
declare const optDataSymbol: unique symbol; | ||
declare const propsCreationDataSymbol: unique symbol; | ||
declare const instanceCreationDataSymbol: unique symbol; | ||
declare const composedPropsCreationDataSymbol: unique symbol; | ||
declare const composedInstanceCreationDataSymbol: unique symbol; | ||
export interface _Model<SuperModel, TProps extends ModelProps> { | ||
@@ -15,10 +17,12 @@ /** | ||
readonly [modelTypeKey]: string | undefined; | ||
[propsDataSymbol]: ModelPropsToData<TProps>; | ||
[creationPropsDataSymbol]: ModelPropsToCreationData<TProps>; | ||
[optPropsDataSymbol]: OptionalModelProps<TProps>; | ||
[creationDataSymbol]: O.Optional<this[typeof creationPropsDataSymbol], this[typeof optPropsDataSymbol]>; | ||
[composedCreationDataSymbol]: SuperModel extends BaseModel<any, infer CD> ? O.Merge<CD, this[typeof creationDataSymbol]> : this[typeof creationDataSymbol]; | ||
new (data: this[typeof composedCreationDataSymbol] & { | ||
[propsDataSymbol]: ModelPropsToPropsData<TProps>; | ||
[instanceDataSymbol]: ModelPropsToInstanceData<TProps>; | ||
[optDataSymbol]: OptionalModelProps<TProps>; | ||
[propsCreationDataSymbol]: ModelPropsToPropsCreationData<TProps>; | ||
[instanceCreationDataSymbol]: ModelPropsToInstanceCreationData<TProps>; | ||
[composedPropsCreationDataSymbol]: SuperModel extends BaseModel<any, infer CD> ? O.Merge<CD, this[typeof propsCreationDataSymbol]> : this[typeof propsCreationDataSymbol]; | ||
[composedInstanceCreationDataSymbol]: SuperModel extends BaseModel<any, infer CD> ? O.Merge<CD, this[typeof instanceCreationDataSymbol]> : this[typeof instanceCreationDataSymbol]; | ||
new (data: this[typeof composedInstanceCreationDataSymbol] & { | ||
[modelIdKey]?: string; | ||
}): SuperModel & BaseModel<this[typeof propsDataSymbol], this[typeof composedCreationDataSymbol]> & Omit<this[typeof propsDataSymbol], keyof AnyModel>; | ||
}): SuperModel & BaseModel<this[typeof propsDataSymbol], this[typeof composedPropsCreationDataSymbol], this[typeof instanceDataSymbol], this[typeof composedInstanceCreationDataSymbol]> & Omit<this[typeof instanceDataSymbol], keyof AnyModel>; | ||
} | ||
@@ -25,0 +29,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
import { AnyModel, ModelClass, ModelCreationData } from "./BaseModel"; | ||
import { AnyModel, ModelClass, ModelPropsCreationData } from "./BaseModel"; | ||
import { modelIdKey } from "./metadata"; | ||
@@ -6,3 +6,3 @@ /** | ||
*/ | ||
export declare const internalNewModel: (<M extends AnyModel>(origModelObj: M, modelClass: ModelClass<M>, initialData: (ModelCreationData<M> & { | ||
export declare const internalNewModel: (<M extends AnyModel>(origModelObj: M, modelClass: ModelClass<M>, initialData: (ModelPropsCreationData<M> & { | ||
[modelIdKey]?: string | undefined; | ||
@@ -9,0 +9,0 @@ }) | undefined, snapshotInitialData: { |
@@ -0,1 +1,3 @@ | ||
import { O } from "ts-toolbelt"; | ||
import { PropTransform } from "../propTransform/propTransform"; | ||
import { LateTypeChecker, TypeChecker } from "../typeChecking/TypeChecker"; | ||
@@ -10,9 +12,12 @@ import { IsOptionalValue } from "../utils/types"; | ||
*/ | ||
export interface ModelProp<TValue, TCreationValue, TIsOptional> { | ||
$valueType: TValue; | ||
$creationValueType: TCreationValue; | ||
export interface ModelProp<TPropValue, TPropCreationValue, TIsOptional, TInstanceValue = TPropValue, TInstanceCreationValue = TPropCreationValue> { | ||
$propValueType: TPropValue; | ||
$propCreationValueType: TPropCreationValue; | ||
$instanceValueType: TInstanceValue; | ||
$instanceCreationValueType: TInstanceCreationValue; | ||
$isOptional: TIsOptional; | ||
defaultFn: (() => TValue) | typeof noDefaultValue; | ||
defaultValue: TValue | typeof noDefaultValue; | ||
defaultFn: (() => TPropValue) | typeof noDefaultValue; | ||
defaultValue: TPropValue | typeof noDefaultValue; | ||
typeChecker: TypeChecker | LateTypeChecker | undefined; | ||
transform: PropTransform<any, any> | undefined; | ||
} | ||
@@ -28,9 +33,27 @@ /** | ||
}[keyof MP]; | ||
export declare type ModelPropsToData<MP extends ModelProps> = { | ||
[k in keyof MP]: MP[k]["$valueType"]; | ||
export declare type ModelPropsToPropsData<MP extends ModelProps> = { | ||
[k in keyof MP]: MP[k]["$propValueType"]; | ||
}; | ||
export declare type ModelPropsToCreationData<MP extends ModelProps> = { | ||
[k in keyof MP]: MP[k]["$creationValueType"]; | ||
export declare type ModelPropsToPropsCreationData<MP extends ModelProps> = O.Optional<{ | ||
[k in keyof MP]: MP[k]["$propCreationValueType"]; | ||
}, OptionalModelProps<MP>>; | ||
export declare type ModelPropsToInstanceData<MP extends ModelProps> = { | ||
[k in keyof MP]: MP[k]["$instanceValueType"]; | ||
}; | ||
export declare type ModelPropsToInstanceCreationData<MP extends ModelProps> = O.Optional<{ | ||
[k in keyof MP]: MP[k]["$instanceCreationValueType"]; | ||
}, OptionalModelProps<MP>>; | ||
/** | ||
* @ignore | ||
*/ | ||
export declare type OnlyPrimitives<T> = Exclude<T, object>; | ||
/** | ||
* A model prop that maybe / maybe not is optional, depending on if the value can take undefined. | ||
*/ | ||
export declare type MaybeOptionalModelProp<TPropValue, TInstanceValue = TPropValue> = ModelProp<TPropValue, TPropValue, IsOptionalValue<TPropValue, string, never>, TInstanceValue, TInstanceValue>; | ||
/** | ||
* A model prop that is definitely optional. | ||
*/ | ||
export declare type OptionalModelProp<TPropValue, TInstanceValue = TPropValue> = ModelProp<TPropValue, TPropValue | null | undefined, string, TInstanceValue, TInstanceValue | null | undefined>; | ||
/** | ||
* Defines a model property with no default value. | ||
@@ -47,3 +70,3 @@ * | ||
*/ | ||
export declare function prop<TValue>(): ModelProp<TValue, TValue, IsOptionalValue<TValue, string, never>>; | ||
export declare function prop<TValue>(): MaybeOptionalModelProp<TValue>; | ||
/** | ||
@@ -63,3 +86,3 @@ * Defines a model property, with an optional function to generate a default value | ||
*/ | ||
export declare function prop<TValue>(defaultFn: () => TValue): ModelProp<TValue, TValue | null | undefined, string>; | ||
export declare function prop<TValue>(defaultFn: () => TValue): OptionalModelProp<TValue>; | ||
/** | ||
@@ -80,2 +103,2 @@ * Defines a model property, with an optional default value | ||
*/ | ||
export declare function prop<TValue>(defaultValue: Exclude<TValue, object>): ModelProp<TValue, TValue | null | undefined, string>; | ||
export declare function prop<TValue>(defaultValue: OnlyPrimitives<TValue>): OptionalModelProp<TValue>; |
@@ -1,2 +0,6 @@ | ||
export * from "./asDate"; | ||
export * from "./propTransform"; | ||
export { PropTransform, propTransform, PropTransformDecorator } from "./propTransform"; | ||
export * from "./transformArrayAsMap"; | ||
export * from "./transformArrayAsSet"; | ||
export * from "./transformObjectAsMap"; | ||
export * from "./transformStringAsDate"; | ||
export * from "./transformTimestampAsDate"; |
@@ -8,13 +8,14 @@ /** | ||
* | ||
* @param prop | ||
* @param propValue | ||
* @returns | ||
*/ | ||
propToData(prop: TProp): TData; | ||
propToData(propValue: TProp): TData; | ||
/** | ||
* Transform from cutom data to property value. | ||
* Transform from custom data to property value. | ||
* You might throw here to make the property read-only. | ||
* | ||
* @param data | ||
* @param dataValue | ||
* @returns | ||
*/ | ||
dataToProp(data: TData): TProp; | ||
dataToProp(dataValue: TData): TProp; | ||
} | ||
@@ -32,3 +33,3 @@ /** | ||
* ```ts | ||
* const asDate = propTransform({ | ||
* const asDate = propTransformDecorator({ | ||
* propToData(prop: number) { | ||
@@ -60,2 +61,2 @@ * return new Date(prop) | ||
*/ | ||
export declare function propTransform<TProp, TData>(transform: PropTransform<TProp, TData>): PropTransformDecorator<TProp>; | ||
export declare function propTransform<TProp, TData>(transform: PropTransform<TProp, TData>): PropTransformDecorator<TProp> & typeof transform; |
@@ -6,3 +6,3 @@ import { ModelClass } from "../model/BaseModel"; | ||
*/ | ||
id: import("..").ModelProp<string, string, never>; | ||
id: import("..").MaybeOptionalModelProp<string, string>; | ||
}>; | ||
@@ -9,0 +9,0 @@ /** |
import { Frozen, frozenKey } from "../frozen/Frozen"; | ||
import { modelIdKey, modelTypeKey } from "../model"; | ||
import { AnyModel, ModelCreationData, ModelData } from "../model/BaseModel"; | ||
import { AnyModel, ModelPropsCreationData, ModelPropsData } from "../model/BaseModel"; | ||
import { ArraySet, ObjectMap } from "../wrappers"; | ||
export interface SnapshotOutOfArray<T> extends Array<SnapshotOutOf<T>> { | ||
} | ||
export interface SnapshotOutOfReadonlyArray<T> extends ReadonlyArray<SnapshotOutOf<T>> { | ||
} | ||
export declare type SnapshotOutOfObject<T extends { | ||
[k: string]: any; | ||
}> = { | ||
export declare type SnapshotOutOfObject<T> = { | ||
[k in keyof T]: SnapshotOutOf<T[k]> extends infer R ? R : never; | ||
}; | ||
export declare type SnapshotOutOfModel<M extends AnyModel> = SnapshotOutOfObject<ModelData<M>> & { | ||
export declare type SnapshotOutOfModel<M extends AnyModel> = SnapshotOutOfObject<ModelPropsData<M>> & { | ||
[modelTypeKey]: string; | ||
@@ -34,10 +28,4 @@ [modelIdKey]: string; | ||
} | ||
export declare type SnapshotOutOf<T> = T extends Array<infer U> ? SnapshotOutOfArray<U> extends infer R ? R : never : T extends ReadonlyArray<infer U> ? SnapshotOutOfReadonlyArray<U> extends infer R ? R : never : T extends ObjectMap<infer V> ? SnapshotOutOfObjectMap<V> extends infer R ? R : never : T extends ArraySet<infer V> ? SnapshotOutOfArraySet<V> extends infer R ? R : never : T extends AnyModel ? SnapshotOutOfModel<T> extends infer R ? R : never : T extends Frozen<any> ? SnapshotOutOfFrozen<T> extends infer R ? R : never : T extends object ? SnapshotOutOfObject<T> extends infer R ? R : never : T; | ||
export interface SnapshotInOfArray<T> extends Array<SnapshotInOf<T>> { | ||
} | ||
export interface SnapshotInOfReadonlyArray<T> extends ReadonlyArray<SnapshotInOf<T>> { | ||
} | ||
export declare type SnapshotInOfObject<T extends { | ||
[k: string]: any; | ||
}> = { | ||
export declare type SnapshotOutOf<T> = T extends ObjectMap<infer V> ? SnapshotOutOfObjectMap<V> extends infer R ? R : never : T extends ArraySet<infer V> ? SnapshotOutOfArraySet<V> extends infer R ? R : never : T extends AnyModel ? SnapshotOutOfModel<T> extends infer R ? R : never : T extends Frozen<any> ? SnapshotOutOfFrozen<T> extends infer R ? R : never : T extends object ? SnapshotOutOfObject<T> extends infer R ? R : never : T; | ||
export declare type SnapshotInOfObject<T> = { | ||
[k in keyof T]: SnapshotInOf<T[k]> extends infer R ? R : never; | ||
@@ -47,3 +35,3 @@ }; | ||
fromSnapshot(sn: infer S): any; | ||
} ? S : ModelCreationData<M>> & { | ||
} ? S : ModelPropsCreationData<M>> & { | ||
[modelTypeKey]: string; | ||
@@ -68,2 +56,2 @@ [modelIdKey]: string; | ||
} | ||
export declare type SnapshotInOf<T> = T extends Array<infer U> ? SnapshotInOfArray<U> extends infer R ? R : never : T extends ReadonlyArray<infer U> ? SnapshotInOfReadonlyArray<U> extends infer R ? R : never : T extends ObjectMap<infer V> ? SnapshotInOfObjectMap<V> extends infer R ? R : never : T extends ArraySet<infer V> ? SnapshotInOfArraySet<V> extends infer R ? R : never : T extends AnyModel ? SnapshotInOfModel<T> extends infer R ? R : never : T extends Frozen<any> ? SnapshotInOfFrozen<T> extends infer R ? R : never : T extends object ? SnapshotInOfObject<T> extends infer R ? R : never : T; | ||
export declare type SnapshotInOf<T> = T extends ObjectMap<infer V> ? SnapshotInOfObjectMap<V> extends infer R ? R : never : T extends ArraySet<infer V> ? SnapshotInOfArraySet<V> extends infer R ? R : never : T extends AnyModel ? SnapshotInOfModel<T> extends infer R ? R : never : T extends Frozen<any> ? SnapshotInOfFrozen<T> extends infer R ? R : never : T extends object ? SnapshotInOfObject<T> extends infer R ? R : never : T; |
@@ -15,3 +15,3 @@ import { AnyStandardType, AnyType, ArrayType } from "./schemas"; | ||
*/ | ||
export declare function typesArray<T extends AnyType>(itemType: T): ArrayType<T>; | ||
export declare function typesArray<T extends AnyType>(itemType: T): ArrayType<T[]>; | ||
/** | ||
@@ -18,0 +18,0 @@ * `types.array` type info. |
@@ -9,3 +9,5 @@ import { O } from "ts-toolbelt"; | ||
/** @ignore */ | ||
$$arrayType: Array<TypeToData<S>> extends infer R ? R : never; | ||
$$arrayType: { | ||
[k in keyof S]: TypeToData<S[k]> extends infer R ? R : never; | ||
}; | ||
} | ||
@@ -12,0 +14,0 @@ export interface ObjectOfTypes { |
@@ -1,3 +0,2 @@ | ||
import { ModelProp } from "../model/prop"; | ||
import { IsOptionalValue } from "../utils/types"; | ||
import { MaybeOptionalModelProp, OnlyPrimitives, OptionalModelProp } from "../model/prop"; | ||
import { AnyType, TypeToData } from "./schemas"; | ||
@@ -16,3 +15,3 @@ /** | ||
*/ | ||
export declare function tProp(defaultValue: string): ModelProp<string, string | null | undefined, string>; | ||
export declare function tProp(defaultValue: string): OptionalModelProp<string>; | ||
/** | ||
@@ -30,3 +29,3 @@ * Defines a number model property with a default value. | ||
*/ | ||
export declare function tProp(defaultValue: number): ModelProp<number, number | null | undefined, string>; | ||
export declare function tProp(defaultValue: number): OptionalModelProp<number>; | ||
/** | ||
@@ -44,3 +43,3 @@ * Defines a boolean model property with a default value. | ||
*/ | ||
export declare function tProp(defaultValue: boolean): ModelProp<boolean, boolean | null | undefined, string>; | ||
export declare function tProp(defaultValue: boolean): OptionalModelProp<boolean>; | ||
/** | ||
@@ -60,3 +59,3 @@ * Defines a model property with no default value and an associated type checker. | ||
*/ | ||
export declare function tProp<TType extends AnyType>(type: TType): ModelProp<TypeToData<TType>, TypeToData<TType>, IsOptionalValue<TypeToData<TType>, string, never>>; | ||
export declare function tProp<TType extends AnyType>(type: TType): MaybeOptionalModelProp<TypeToData<TType>>; | ||
/** | ||
@@ -78,3 +77,3 @@ * Defines a model property, with an optional function to generate a default value | ||
*/ | ||
export declare function tProp<TType extends AnyType>(type: TType, defaultFn: () => TypeToData<TType>): ModelProp<TypeToData<TType>, TypeToData<TType> | null | undefined, string>; | ||
export declare function tProp<TType extends AnyType>(type: TType, defaultFn: () => TypeToData<TType>): OptionalModelProp<TypeToData<TType>>; | ||
/** | ||
@@ -97,2 +96,2 @@ * Defines a model property, with an optional default value | ||
*/ | ||
export declare function tProp<TType extends AnyType>(type: TType, defaultValue: Exclude<TypeToData<TType>, object>): ModelProp<TypeToData<TType>, TypeToData<TType> | null | undefined, string>; | ||
export declare function tProp<TType extends AnyType>(type: TType, defaultValue: OnlyPrimitives<TypeToData<TType>>): OptionalModelProp<TypeToData<TType>>; |
@@ -13,5 +13,7 @@ import { ArrayTypeInfo, typesArray } from "./array"; | ||
import { RefinementTypeInfo, typesRefinement } from "./refinement"; | ||
import { AnyType } from "./schemas"; | ||
import { TupleTypeInfo, typesTuple } from "./tuple"; | ||
import { typesUnchecked, UncheckedTypeInfo } from "./unchecked"; | ||
export { getTypeInfo, TypeInfo } from "./TypeChecker"; | ||
export { BooleanTypeInfo, LiteralTypeInfo, NumberTypeInfo, StringTypeInfo, FrozenTypeInfo, ObjectMapTypeInfo, RefinementTypeInfo, RecordTypeInfo, RefTypeInfo, UncheckedTypeInfo, ObjectTypeInfo, ObjectTypeInfoProps, ArraySetTypeInfo, ArrayTypeInfo, ModelTypeInfo, ModelTypeInfoProps, OrTypeInfo, }; | ||
export { BooleanTypeInfo, LiteralTypeInfo, NumberTypeInfo, StringTypeInfo, FrozenTypeInfo, ObjectMapTypeInfo, RefinementTypeInfo, RecordTypeInfo, RefTypeInfo, UncheckedTypeInfo, ObjectTypeInfo, ObjectTypeInfoProps, ArraySetTypeInfo, ArrayTypeInfo, ModelTypeInfo, ModelTypeInfoProps, OrTypeInfo, TupleTypeInfo, }; | ||
export declare const types: { | ||
@@ -40,2 +42,8 @@ literal: typeof typesLiteral; | ||
arraySet: typeof typesArraySet; | ||
tuple: typeof typesTuple; | ||
mapArray<T extends AnyType>(valueType: T): import("./schemas").ArrayType<import("./schemas").ArrayType<[import("./schemas").IdentityType<string>, T]>[]>; | ||
setArray<T_1 extends AnyType>(valueType: T_1): import("./schemas").ArrayType<T_1[]>; | ||
mapObject<T_2 extends AnyType>(valueType: T_2): import("./schemas").RecordType<T_2>; | ||
dateString: import("./schemas").IdentityType<string>; | ||
dateTimestamp: import("./schemas").IdentityType<number>; | ||
}; |
declare const ArraySet_base: import("../model/Model")._Model<unknown, { | ||
items: import("..").ModelProp<any[], any[] | null | undefined, string>; | ||
items: import("..").OptionalModelProp<any[], any[]>; | ||
}>; | ||
@@ -4,0 +4,0 @@ /** |
@@ -1,5 +0,5 @@ | ||
export * from "./arrayAsMap"; | ||
export * from "./arrayAsSet"; | ||
export * from "./arrayAsMapWrapper"; | ||
export * from "./arrayAsSetWrapper"; | ||
export * from "./ArraySet"; | ||
export * from "./objectAsMap"; | ||
export * from "./objectAsMapWrapper"; | ||
export * from "./ObjectMap"; |
declare const ObjectMap_base: import("../model/Model")._Model<unknown, { | ||
items: import("..").ModelProp<{ | ||
items: import("..").OptionalModelProp<{ | ||
[k: string]: any; | ||
}, { | ||
[k: string]: any; | ||
} | null | undefined, string>; | ||
}>; | ||
}>; | ||
@@ -8,0 +8,0 @@ /** |
{ | ||
"name": "mobx-keystone", | ||
"version": "0.39.0", | ||
"version": "0.40.0", | ||
"description": "A MobX powered state management solution based on data trees with first class support for Typescript, snapshots, patches and much more", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3847997
149
31012