replicache
Advanced tools
Comparing version 12.2.1 to 12.2.2
@@ -119,3 +119,3 @@ /** The values that can be represented in JSON */ | ||
*/ | ||
declare type Hash = { | ||
declare type Hash = string & { | ||
[hashTag]: true; | ||
@@ -207,32 +207,2 @@ }; | ||
/** | ||
* The definition of a single index. | ||
*/ | ||
declare type IndexDefinition = { | ||
/** | ||
* The prefix, if any, to limit the index over. If not provided the values of | ||
* all keys are indexed. | ||
*/ | ||
readonly prefix?: string; | ||
/** | ||
* A [JSON Pointer](https://tools.ietf.org/html/rfc6901) pointing at the sub | ||
* value inside each value to index over. | ||
* | ||
* For example, one might index over users' ages like so: | ||
* `{prefix: '/user/', jsonPointer: '/age'}` | ||
*/ | ||
readonly jsonPointer: string; | ||
/** | ||
* If `true`, indexing empty values will not emit a warning. Defaults to `false`. | ||
*/ | ||
readonly allowEmpty?: boolean; | ||
}; | ||
/** | ||
* An object as a map defining the indexes. The keys are the index names and the | ||
* values are the index definitions. | ||
*/ | ||
declare type IndexDefinitions = { | ||
readonly [name: string]: IndexDefinition; | ||
}; | ||
declare type Entry<V> = readonly [key: string, value: V]; | ||
@@ -282,2 +252,32 @@ /** | ||
/** | ||
* The definition of a single index. | ||
*/ | ||
declare type IndexDefinition = { | ||
/** | ||
* The prefix, if any, to limit the index over. If not provided the values of | ||
* all keys are indexed. | ||
*/ | ||
readonly prefix?: string; | ||
/** | ||
* A [JSON Pointer](https://tools.ietf.org/html/rfc6901) pointing at the sub | ||
* value inside each value to index over. | ||
* | ||
* For example, one might index over users' ages like so: | ||
* `{prefix: '/user/', jsonPointer: '/age'}` | ||
*/ | ||
readonly jsonPointer: string; | ||
/** | ||
* If `true`, indexing empty values will not emit a warning. Defaults to `false`. | ||
*/ | ||
readonly allowEmpty?: boolean; | ||
}; | ||
/** | ||
* An object as a map defining the indexes. The keys are the index names and the | ||
* values are the index definitions. | ||
*/ | ||
declare type IndexDefinitions = { | ||
readonly [name: string]: IndexDefinition; | ||
}; | ||
/** | ||
* The JSON value used as the body when doing a POST to the [pull | ||
@@ -284,0 +284,0 @@ * endpoint](/reference/server-pull). |
{ | ||
"name": "replicache", | ||
"description": "Realtime sync for any backend stack", | ||
"version": "12.2.1", | ||
"version": "12.2.2", | ||
"repository": "github:rocicorp/replicache", | ||
@@ -6,0 +6,0 @@ "license": "https://roci.dev/terms.html", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
386461
2617