Interface: Store<T>
Type parameters
Name | Type |
---|---|
T | any |
Implemented by
Properties
set
• set: (key
: string
, value
: T
, ttl?
: number
) => boolean
| Promise
<boolean
>
Type declaration
▸ (key
, value
, ttl?
): boolean
| Promise
<boolean
>
Parameters
Name | Type |
---|---|
key | string |
value | T |
ttl? | number |
Returns
boolean
| Promise
<boolean
>
Defined in
get
• get: (key
: string
) => null
| T
| Promise
<null
| T
>
Type declaration
▸ (key
): null
| T
| Promise
<null
| T
>
Parameters
Name | Type |
---|---|
key | string |
Returns
null
| T
| Promise
<null
| T
>
Defined in
delete
• delete: (key
: string
) => boolean
| Promise
<boolean
>
Type declaration
▸ (key
): boolean
| Promise
<boolean
>
Parameters
Name | Type |
---|---|
key | string |
Returns
boolean
| Promise
<boolean
>
Defined in
clear
• clear: () => void
| Promise
<void
>
Type declaration
▸ (): void
| Promise
<void
>
Returns
void
| Promise
<void
>