indexeddbshim 17.4.1 → 17.4.3

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.
@@ -1,4 +1,4 @@
1
- /*! indexeddbshim - v17.4.1 - 8/29/2026 */
1
+ /*! indexeddbshim - v17.4.3 - 8/29/2026 */
2
2
 
3
3
  'use strict';
4
4
 
@@ -12691,7 +12691,7 @@ function setConfig(prop, val) {
12691
12691
  */
12692
12692
 
12693
12693
  /**
12694
- * @typedef {(typeof globalThis|object) & {
12694
+ * @typedef {(typeof globalThis|Record<string, unknown>) & {
12695
12695
  * indexedDB?: Partial<IDBFactory>,
12696
12696
  * IDBFactory: typeof IDBFactory,
12697
12697
  * IDBOpenDBRequest: typeof IDBOpenDBRequest,
@@ -12707,7 +12707,7 @@ function setConfig(prop, val) {
12707
12707
 
12708
12708
  /**
12709
12709
  *
12710
- * @param {ShimmedObject} [idb]
12710
+ * @param {typeof globalThis | Record<string, unknown>} [idb]
12711
12711
  * @param {Partial<import('./CFG.js').ConfigValues>} [initialConfig]
12712
12712
  * @returns {ShimmedObject}
12713
12713
  */
@@ -12715,7 +12715,8 @@ function setGlobalVars(idb, initialConfig) {
12715
12715
  if (initialConfig) {
12716
12716
  setConfig(initialConfig);
12717
12717
  }
12718
- const IDB = idb || globalThis || {};
12718
+ const IDB = /** @type {ShimmedObject & {[key: string]: unknown}} */
12719
+ /** @type {unknown} */idb || globalThis || {};
12719
12720
  /**
12720
12721
  * @typedef {any} AnyClass
12721
12722
  */
@@ -12737,15 +12738,12 @@ function setGlobalVars(idb, initialConfig) {
12737
12738
  if (!propDesc || !Object.defineProperty) {
12738
12739
  try {
12739
12740
  // Try setting the property. This will fail if the property is read-only.
12740
- // @ts-expect-error It's ok
12741
12741
  IDB[name] = value;
12742
12742
  } catch (e) {
12743
12743
  console.log(e);
12744
12744
  }
12745
12745
  }
12746
- if (
12747
- // @ts-expect-error It's ok
12748
- IDB[name] !== value && Object.defineProperty) {
12746
+ if (IDB[name] !== value && Object.defineProperty) {
12749
12747
  // Setting a read-only property failed, so try re-defining the property
12750
12748
  try {
12751
12749
  let desc = propDesc || {};
@@ -12775,8 +12773,6 @@ function setGlobalVars(idb, initialConfig) {
12775
12773
  // get here since no WebSQL to use for shimming)
12776
12774
  }
12777
12775
  }
12778
-
12779
- // @ts-expect-error It's ok
12780
12776
  if (IDB[name] !== value) {
12781
12777
  if (typeof console !== 'undefined' && console.warn) {
12782
12778
  console.warn('Unable to shim ' + name);
@@ -15026,7 +15022,7 @@ CFG.win = {
15026
15022
  };
15027
15023
 
15028
15024
  /**
15029
- * @param {import('./setGlobalVars.js').ShimmedObject} [idb]
15025
+ * @param {typeof globalThis | Record<string, unknown>} [idb]
15030
15026
  * @param {Partial<import('./CFG.js').ConfigValues>} [initialConfig]
15031
15027
  * @returns {import('./setGlobalVars.js').ShimmedObject|Window}
15032
15028
  */