Class: ClientStorage
The ClientStorage class is a utility class for storing strings and objects.
When using MedplumClient in the browser, it will be backed by browser localStorage.
When Using MedplumClient in the server, it will be backed by the MemoryStorage class. For example, the Medplum CLI uses FileSystemStorage
.
Constructors
constructor
• new ClientStorage()
Defined in
packages/core/src/storage.ts:13
Methods
clear
▸ clear(): void
Returns
void
Defined in
packages/core/src/storage.ts:17
getString
▸ getString(key
): undefined
| string
Parameters
Name | Type |
---|---|
key | string |
Returns
undefined
| string
Defined in
packages/core/src/storage.ts:21
setString
▸ setString(key
, value
): void
Parameters
Name | Type |
---|---|
key | string |
value | undefined | string |
Returns
void
Defined in
packages/core/src/storage.ts:25
getObject
▸ getObject<T
>(key
): undefined
| T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
key | string |
Returns
undefined
| T
Defined in
packages/core/src/storage.ts:33
setObject
▸ setObject<T
>(key
, value
): void
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
key | string |
value | T |
Returns
void
Defined in
packages/core/src/storage.ts:38