Skip to main content

Interface: Store<T>

Type parameters

NameType
Tany

Implemented by

Properties

set

set: (key: string, value: T, ttl?: number) => boolean | Promise<boolean>

Type declaration

▸ (key, value, ttl?): boolean | Promise<boolean>

Parameters
NameType
keystring
valueT
ttl?number
Returns

boolean | Promise<boolean>

Defined in

types/lib.ts:5


get

get: (key: string) => null | T | Promise<null | T>

Type declaration

▸ (key): null | T | Promise<null | T>

Parameters
NameType
keystring
Returns

null | T | Promise<null | T>

Defined in

types/lib.ts:6


delete

delete: (key: string) => boolean | Promise<boolean>

Type declaration

▸ (key): boolean | Promise<boolean>

Parameters
NameType
keystring
Returns

boolean | Promise<boolean>

Defined in

types/lib.ts:7


clear

clear: () => void | Promise<void>

Type declaration

▸ (): void | Promise<void>

Returns

void | Promise<void>

Defined in

types/lib.ts:8