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

16 lines (15 loc) 435 B
import { ObservableSet } from 'mobx'; /** * Wraps an observable array to offer a set like interface. * * @param array */ export declare function asSet<T>(array: Array<T>): ObservableSet<T> & { dataObject: typeof array; }; /** * Converts a set to an array. If the set is a collection wrapper it will return the backed array. * * @param set */ export declare function setToArray<T>(set: Set<T> | ObservableSet<T>): Array<T>;