In my TypeScript code, I have defined a function like so:
setLocalStorage: async (key: string, value: string): Promise<string> => {
return new Promise((resolve, reject) => {
chrome.storage.local.set({
key: value
}, function () {
resolve("");
});
});
},
However, Visual Studio Code is showing an error:
'key' is declared but its value is never read.ts(6133)
Even though the key is used in the chrome storage set function, why is this error appearing? What steps should I take to resolve it?