Skip to content
ClassStorage & Replay@public

NullStorageBackend ​

In-memory storage backend for headless unit tests. Data lives only for the lifetime of this instance.

ts
export declare class NullStorageBackend implements FlxStorageBackend

Methods ​

close() ​

ts
close(key: string): void

Parameters:

ParameterTypeDescription
keystring-

Returns: void

erase() ​

ts
erase(key: string): boolean

Parameters:

ParameterTypeDescription
keystring-

Returns: boolean

read() ​

ts
read(key: string): Record<string, unknown> | null

Parameters:

ParameterTypeDescription
keystring-

Returns: Record<string, unknown> | null

write() ​

ts
write(key: string, data: Record<string, unknown>): FlxSaveResult

Parameters:

ParameterTypeDescription
keystring-
dataRecord<string, unknown>-

Returns: FlxSaveResult

Released under the MIT License.