UNPKG

mobx-keystone

Version:

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

3 lines (2 loc) 207 B
export declare function getOrCreate<K, V, C = V>(map: Map<K, V>, key: K, create: () => C): V; export declare function getOrCreate<K extends object, V, C = V>(map: WeakMap<K, V>, key: K, create: () => C): V;