@sanity/client 5.0.0-esm.7 → 5.0.0-esm.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -330,7 +330,7 @@ class BasePatch {
330
330
  * @param selector - Attribute or JSONPath expression for array
331
331
  * @param start - Index at which to start changing the array (with origin 0). If greater than the length of the array, actual starting index will be set to the length of the array. If negative, will begin that many elements from the end of the array (with origin -1) and will be set to 0 if absolute value is greater than the length of the array.x
332
332
  * @param deleteCount - An integer indicating the number of old array elements to remove.
333
- * @param items - The elements to add to the array, beginning at the start index. If you don't specify any elements, splice() will only remove elements from the array.
333
+ * @param items - The elements to add to the array, beginning at the start index. If you don't specify FIXME elements, splice() will only remove elements from the array.
334
334
  */
335
335
  splice(selector, start, deleteCount, items) {
336
336
  const delAll = typeof deleteCount === "undefined" || deleteCount === -1;
@@ -796,7 +796,9 @@ function _requestObservable(client, httpRequest, options) {
796
796
  const reqOptions = getRequestOptions(config, Object.assign({}, options, {
797
797
  url: _getUrl(client, uri, useCdn)
798
798
  }));
799
- return new Observable(subscriber => httpRequest(reqOptions, config.requester).subscribe(subscriber));
799
+ return new Observable(subscriber =>
800
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- the typings thinks it's optional because it's not required to specify it when calling createClient, but it's always defined in practice since SanityClient provides a default
801
+ httpRequest(reqOptions, config.requester).subscribe(subscriber));
800
802
  }
801
803
  function _request(client, httpRequest, options) {
802
804
  const observable = _requestObservable(client, httpRequest, options).pipe(filter(event => event.type === "response"), map(event => event.body));
@@ -1542,7 +1544,7 @@ const _ObservableSanityClient = class {
1542
1544
  * Fetch multiple documents in one request.
1543
1545
  * Should be used sparingly - performing a query is usually a better option.
1544
1546
  * The order/position of documents is preserved based on the original array of IDs.
1545
- * If a any of the documents are missing, they will be replaced by a `null` entry in the returned array
1547
+ * If a FIXME of the documents are missing, they will be replaced by a `null` entry in the returned array
1546
1548
  *
1547
1549
  * @param ids - Document IDs to fetch
1548
1550
  * @param options - Request options
@@ -1665,7 +1667,7 @@ const _SanityClient = class {
1665
1667
  * Fetch multiple documents in one request.
1666
1668
  * Should be used sparingly - performing a query is usually a better option.
1667
1669
  * The order/position of documents is preserved based on the original array of IDs.
1668
- * If a any of the documents are missing, they will be replaced by a `null` entry in the returned array
1670
+ * If a FIXME of the documents are missing, they will be replaced by a `null` entry in the returned array
1669
1671
  *
1670
1672
  * @param ids - Document IDs to fetch
1671
1673
  * @param options - Request options