indexeddbshim 17.4.1 → 17.4.2

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.2 - 8/29/2026 */
2
2
 
3
3
  (function (factory) {
4
4
  typeof define === 'function' && define.amd ? define(factory) :
@@ -13767,7 +13767,7 @@
13767
13767
  */
13768
13768
 
13769
13769
  /**
13770
- * @typedef {(typeof globalThis|object) & {
13770
+ * @typedef {(typeof globalThis|Record<string, unknown>) & {
13771
13771
  * indexedDB?: Partial<IDBFactory>,
13772
13772
  * IDBFactory: typeof IDBFactory,
13773
13773
  * IDBOpenDBRequest: typeof IDBOpenDBRequest,
@@ -13783,12 +13783,13 @@
13783
13783
 
13784
13784
  /**
13785
13785
  *
13786
- * @param {ShimmedObject} [idb]
13786
+ * @param {typeof globalThis | Record<string, unknown>} [idb]
13787
13787
  * @param {Partial<import('./CFG.js').ConfigValues>} [initialConfig]
13788
13788
  * @returns {ShimmedObject}
13789
13789
  */
13790
13790
  function setGlobalVars(idb, initialConfig) {
13791
- var IDB = globalThis || {};
13791
+ var IDB = /** @type {ShimmedObject & {[key: string]: unknown}} */
13792
+ /** @type {unknown} */globalThis || {};
13792
13793
  /**
13793
13794
  * @typedef {any} AnyClass
13794
13795
  */
@@ -13810,15 +13811,12 @@
13810
13811
  if (!propDesc || !Object.defineProperty) {
13811
13812
  try {
13812
13813
  // Try setting the property. This will fail if the property is read-only.
13813
- // @ts-expect-error It's ok
13814
13814
  IDB[name] = value;
13815
13815
  } catch (e) {
13816
13816
  console.log(e);
13817
13817
  }
13818
13818
  }
13819
- if (
13820
- // @ts-expect-error It's ok
13821
- IDB[name] !== value && Object.defineProperty) {
13819
+ if (IDB[name] !== value && Object.defineProperty) {
13822
13820
  // Setting a read-only property failed, so try re-defining the property
13823
13821
  try {
13824
13822
  var desc = propDesc || {};
@@ -13843,8 +13841,6 @@
13843
13841
  // get here since no WebSQL to use for shimming)
13844
13842
  }
13845
13843
  }
13846
-
13847
- // @ts-expect-error It's ok
13848
13844
  if (IDB[name] !== value) {
13849
13845
  if (typeof console !== 'undefined' && console.warn) {
13850
13846
  console.warn('Unable to shim ' + name);