UNPKG

mobx-keystone-mindreframer

Version:

A MobX powered state management solution based on data trees with first class support for Typescript, snapshots, patches and much more

25 lines (24 loc) 788 B
import { ObjectMap } from "../wrappers/ObjectMap"; import type { AnyStandardType, AnyType, IdentityType, TypeToData } from "./schemas"; import { TypeInfo } from "./TypeChecker"; /** * A type that represents an object-like map ObjectMap. * * Example: * ```ts * const numberMapType = types.objectMap(types.number) * ``` * * @typeparam T Value type. * @param valueType Value type. * @returns */ export declare function typesObjectMap<T extends AnyType>(valueType: T): IdentityType<ObjectMap<TypeToData<T>>>; /** * `types.objectMap` type info. */ export declare class ObjectMapTypeInfo extends TypeInfo { readonly valueType: AnyStandardType; get valueTypeInfo(): TypeInfo; constructor(thisType: AnyStandardType, valueType: AnyStandardType); }