chrome-promise icon indicating copy to clipboard operation
chrome-promise copied to clipboard

Types out of date

Open Quantumplation opened this issue 5 years ago • 4 comments

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 avatar May 12 '20 18:05 Quantumplation

Looks like the relevant commit is here:

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

Quantumplation avatar May 12 '20 18:05 Quantumplation

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.

Quantumplation avatar May 12 '20 19:05 Quantumplation

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

tscislo avatar Oct 01 '22 20:10 tscislo

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.

tscislo avatar Oct 02 '22 19:10 tscislo