I am new to TypeScript and I don't know what type to use when I am calling library functions / methods. For example I am using the headless chrome module in my Node.js project.
import puppeteer = require("puppeteer");
async function launchBrowser () {
const browser = await puppeteer.launch();
return browser;
}
// In this case I do not know the return type of the launch method. What should I do?
async function launchBrowser (): Promise<any> {
const browser: any = await puppeteer.launch();
return browser;
}
Should I use any or leave it without type?