I'm trying to add an async function in a TypeScript project. The code looks like this:
chrome.tabs.onUpdated.addListener(async (id, c, t) => { ... }); TypeScript complains:
error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your --lib option
When I add lib: ['es2015'] to tsconfig, TypeScript starts complaining about all calls to console.log saying that console is undefined.