Skip to content
On this page

Class: SimpleStorageManager ​

管理 SimpleStorage 的类. 用于将 SimpleStorage 的数据进行序列化和反序列化.

Constructors ​

constructor ​

new SimpleStorageManager(rootStorage)

Parameters ​

NameType
rootStorageSimpleStorage

Defined in ​

dist/src/storage/simple-storage.d.ts:26

Methods ​

recovery ​

recovery(data): void

恢复从 toString 拿到的状态数据.

Parameters ​

NameType
datastring

Returns ​

void

Defined in ​

dist/src/storage/simple-storage.d.ts:31


toString ​

toString(): string

将当前的状态数据序列化为字符串. 之后可以通过 recovery 方法恢复状态.

Returns ​

string

Defined in ​

dist/src/storage/simple-storage.d.ts:35