You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if this is the right place to ask, but here we go.
I recently created a Chrome extension using TypeScript and decided to add some test codes using Jest. Then I found a StackOverflow answer that led me to this repository.
Because my project uses TypeScript, I needed to install @types/sinon-chrome to get it working. However, unlike @types/chrome, only methods and events are defined in @types/sinon-chrome. In other words, types and properties are not defined in @types/sinon-chrome. For example, chrome.bookmarks API contains 2 types, 2 properties, 11 methods, and 7 events; @types/chrome has all of them, but types and properties are absent in @types/sinon-chrome.
I tried copy-and-pasting the code in @types/chrome to @types/sinon-chrome and it works like a charm. So my questions are as follows:
If I can create a pull request, is it okay to copy and paste from @types/chrome?
If someone else is in charge of that, what can I do in the meantime? Should all of my coworkers manually copy and paste what is lacking in @types/sinon-chrome?
The text was updated successfully, but these errors were encountered:
For my use case, web-ext-types doesn't seem to have it... @ariasuni
After implementing web-ext-types, global.chrome = chrome still gives me:
Type 'typeof SinonChrome' is missing the following properties from type 'typeof chrome': cast, accessibilityFeatures, action, browser, and 26 more.ts(2740)
@Bartleby2718 , did you ever reach a resolution or is the solution to copy paste from @types/chrome?
I'm not sure if this is the right place to ask, but here we go.
I recently created a Chrome extension using TypeScript and decided to add some test codes using Jest. Then I found a StackOverflow answer that led me to this repository.
Because my project uses TypeScript, I needed to install @types/sinon-chrome to get it working. However, unlike @types/chrome, only
methods
andevents
are defined in @types/sinon-chrome. In other words,types
andproperties
are not defined in @types/sinon-chrome. For example,chrome.bookmarks
API contains 2types
, 2properties
, 11methods
, and 7events
; @types/chrome has all of them, buttypes
andproperties
are absent in @types/sinon-chrome.I tried copy-and-pasting the code in @types/chrome to @types/sinon-chrome and it works like a charm. So my questions are as follows:
The text was updated successfully, but these errors were encountered: