tfoxy / chrome-promise

Promises for chrome JavaScript APIs used in extensions and apps.
MIT License
150 stars 14 forks source link

Types out of date #32

Open Quantumplation opened 4 years ago

Quantumplation commented 4 years ago

Upgraded chrome typings recently, and now chrome-promise is failing with the following errors:

/srv/package/node_modules/chrome-promise/chrome-promise.d.ts
ERROR in /srv/package/node_modules/chrome-promise/chrome-promise.d.ts(73,51):
TS2694: Namespace 'chrome.accessibilityFeatures' has no exported member 'AccessibilityFeaturesGetArg'.
/srv/package/node_modules/chrome-promise/chrome-promise.d.ts
ERROR in /srv/package/node_modules/chrome-promise/chrome-promise.d.ts(73,118):
TS2694: Namespace 'chrome.accessibilityFeatures' has no exported member 'AccessibilityFeaturesCallbackArg'.
/srv/package/node_modules/chrome-promise/chrome-promise.d.ts
ERROR in /srv/package/node_modules/chrome-promise/chrome-promise.d.ts(81,51):
TS2694: Namespace 'chrome.accessibilityFeatures' has no exported member 'AccessibilityFeaturesSetArg'.
/srv/package/node_modules/chrome-promise/chrome-promise.d.ts
ERROR in /srv/package/node_modules/chrome-promise/chrome-promise.d.ts(89,53):
TS2694: Namespace 'chrome.accessibilityFeatures' has no exported member 'AccessibilityFeaturesClearArg'.
Quantumplation commented 4 years ago

Looks like the relevant commit is here:

https://github.com/DefinitelyTyped/DefinitelyTyped/commit/f34693c881c286ebdf2a33d25542b009f8e4f297#diff-825aab95db5570e43fc04346c6b2971e

Quantumplation commented 4 years ago

Last version that worked, for anyone coming across this issue:

"@types/chrome": "0.0.96",

I personally don't depend on anything changed since then, but I'm sure it'll become a problem for people eventually.

tscislo commented 2 years ago

@Quantumplation can you recommend any alternative that this compatible with latest Chrome?

tscislo commented 2 years ago

If anybody is still wondering... apparently this lib is not longer needed with Chrome manifest v3, because all Chrome APIs are already promisified. So basically there is no need for this library. @Quantumplation @tfoxy. Currently I only use it for backwards compatibility for chrome extensions that still run manifest v3.