Skip to main content

Replicache#

Table of contents#

Classes#

Interfaces#

Type aliases#

InitInput#

Ƭ InitInput: string | RequestInfo | URL | Response | BufferSource | WebAssembly.Module

This type is used for the ReplicacheOptions.wasmModule property.

Defined in: repm-invoker.ts:9


JSONObject#

Ƭ JSONObject: Partial<{ [key: string]: JSONValue; }>

A JSON object. We allow undefined values because in TypeScript there is no way to express optional missing properties vs properties with the value undefined.

Defined in: json.ts:15


JSONValue#

Ƭ JSONValue: null | string | boolean | number | JSONValue[] | JSONObject

The values that can be represented in JSON

Defined in: json.ts:2


KeyTypeForScanOptions#

Ƭ KeyTypeForScanOptions<O>: O extends { indexName: string } ? ScanOptionIndexedStartKey : string

If the options contains an indexName then the key type is a tuple of secondary and primary.

Type parameters:#

NameType
OScanOptions

Defined in: scan-options.ts:57


LogLevel#

Ƭ LogLevel: error | info | debug

The different log levels. This is used to determine how much logging to do. 'error' > 'info' > 'debug'... meaning 'error' has highest priority and 'debug' lowest.

Defined in: logger.ts:19


MaybePromise#

Ƭ MaybePromise<T>: T | Promise<T>

Type parameters:#

Name
T

Defined in: replicache.ts:32


MutatorDefs#

Ƭ MutatorDefs: object

The type used to describe the mutator definitions passed into Replicache constructor as part of the ReplicacheOptions.

See ReplicacheOptions mutators for more info.

Type declaration:#

Defined in: replicache.ts:48


ScanIndexOptions#

Ƭ ScanIndexOptions: object

Options for scan and scanAll when scanning over an index. When scanning over and index you need to provide the indexName and the start key is now a tuple consisting of secondar and primary key

Type declaration:#

NameTypeDescription
indexNamestringDo a scan over a named index. The indexName is the name of an index previously created with createIndex.
limit?numberOnly include up to limit results.
prefix?stringOnly include results starting with the secondary keys starting with prefix.
start?objectWhen provided the scan starts at this key.
start.exclusive?booleanWhether the key is exclusive or inclusive.
start.keyScanOptionIndexedStartKey-

Defined in: scan-options.ts:33


ScanNoIndexOptions#

Ƭ ScanNoIndexOptions: object

Options for scan and scanAll when scanning over the entire key space.

Type declaration:#

NameTypeDescription
limit?numberOnly include up to limit results.
prefix?stringOnly include keys starting with prefix.
start?objectWhen provided the scan starts at this key.
start.exclusive?booleanWhether the key is exclusive or inclusive.
start.keystring-

Defined in: scan-options.ts:11


ScanOptionIndexedStartKey#

Ƭ ScanOptionIndexedStartKey: [secondary: string, primary?: string] | string

The key to start scanning at.

If you are scanning the primary index (i.e., you did not specify indexName), then pass a single string for this field, which is the key in the primary index to scan at.

If you are scanning a secondary index (i.e., you specified indexName), then use the tuple form. In that case, secondary is the secondary key to start scanning at, and primary (if any) is the primary key to start scanning at.

Defined in: scan-options.ts:75


ScanOptions#

Ƭ ScanOptions: ScanIndexOptions | ScanNoIndexOptions

Options for scan and scanAll

Defined in: scan-options.ts:5