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) 795 B
import type { AnyStandardType, AnyType, RecordType } from "./schemas"; import { TypeInfo } from "./TypeChecker"; /** * A type that represents an object-like map, an object with string keys and values all of a same given type. * * Example: * ```ts * // { [k: string]: number } * const numberMapType = types.record(types.number) * ``` * * @typeparam T Type. * @param valueType Type of the values of the object-like map. * @returns */ export declare function typesRecord<T extends AnyType>(valueType: T): RecordType<T>; /** * `types.record` type info. */ export declare class RecordTypeInfo extends TypeInfo { readonly valueType: AnyStandardType; get valueTypeInfo(): TypeInfo; constructor(thisType: AnyStandardType, valueType: AnyStandardType); }