mobx-persist-store
Version:
Mobx Persist Store
10 lines (9 loc) • 394 B
TypeScript
import { PersistenceStorageOptions } from './types';
export type SerializableProperty<T, P extends keyof T> = {
[X in P]: {
key: X;
serialize: (value: T[X]) => any;
deserialize: (value: any) => T[X];
};
}[P];
export declare const makeSerializableProperties: <T, P extends keyof T>(properties: (P | SerializableProperty<T, P>)[]) => SerializableProperty<T, P>[];