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
34 lines (33 loc) • 1.19 kB
TypeScript
declare const ObjectMap_base: import("../model/Model")._Model<unknown, {
items: import("..").OptionalModelProp<{
[k: string]: any;
}>;
} & {
$modelId: import("..").ModelProp<string, string, string, true, never>;
}>;
/**
* A map that is backed by an object-like map.
* Use `objectMap` to create it.
*/
export declare class ObjectMap<V> extends ObjectMap_base implements Map<string, V> {
clear(): void;
delete(key: string): boolean;
forEach(callbackfn: (value: V, key: string, map: Map<string, V>) => void, thisArg?: any): void;
get(key: string): V | undefined;
has(key: string): boolean;
set(key: string, value: V): this;
get size(): number;
keys(): IterableIterator<string>;
values(): IterableIterator<V>;
entries(): IterableIterator<[string, V]>;
[Symbol.iterator](): IterableIterator<[string, V]>;
get [Symbol.toStringTag](): string;
}
/**
* Creates a new ObjectMap model instance.
*
* @typeparam V Value type.
* @param [entries] Optional initial values.
*/
export declare function objectMap<V>(entries?: ReadonlyArray<readonly [string, V]> | null): ObjectMap<V>;
export {};