mps3 / MPS3
• new MPS3(config): MPS3
| Name | Type |
|---|---|
config |
MPS3Config |
▪ Static LOCAL_ENDPOINT: string = "indexdb:"
Virtual endpoint for local-first operation
▸ delete(ref, options?): Promise<unknown[]>
| Name | Type |
|---|---|
ref |
string | Ref |
options |
Object |
options.manifests? |
Ref[] |
Promise<unknown[]>
▸ get(ref, options?): Promise<undefined | JSONValue>
| Name | Type |
|---|---|
ref |
string | Ref |
options |
Object |
options.manifest? |
Ref |
Promise<undefined | JSONValue>
▸ put(ref, value, options?): Promise<unknown[]>
| Name | Type |
|---|---|
ref |
string | Ref |
value |
undefined | JSONValue |
options |
Object |
options.await? |
"local" | "remote" |
options.manifests? |
Ref[] |
Promise<unknown[]>
▸ putAll(values, options?): Promise<unknown[]>
| Name | Type |
|---|---|
values |
Map<string | Ref, undefined | JSONValue> |
options |
Object |
options.await? |
"local" | "remote" |
options.isLoad? |
boolean |
options.manifests? |
Ref[] |
Promise<unknown[]>
▸ subscribe(key, handler, options?): () => void
Listen to a key for changes
| Name | Type | Description |
|---|---|---|
key |
string | Ref |
|
handler |
(value: undefined | JSONValue, error?: Error) => void |
callback to be notified of changes |
options? |
Object |
- |
options.manifest? |
Ref |
- |
fn
unsubscribe function
▸ (): void
void