As per the documentation from Mozilla, I should be able to utilize browser.storage.sync.get
in my extension. However, I am encountering some challenges in getting TypeScript to recognize that I can use browser
.
I have attempted the following (which has worked for using chrome
)
package
"@types/chrome": "^0.0.209",
"@types/firefox": "^0.0.31",
tsconfig.json
{
"compilerOptions": {
"target": "es6",
"module": "CommonJS",
"strict": true,
"resolveJsonModule": true,
"types": ["chrome", "firefox"]
},
"include": ["src", "scripts", "bundle.ts"],
"exclude": ["node_modules", "dist", "scripts"]
}
What could I be overlooking?