Merge pull request #30080 from mtsmfm/puppeteer-core

[puppeteer-core] Create types for puppeteer-core
This commit is contained in:
Daniel Rosenwasser
2018-10-30 12:31:59 -07:00
committed by GitHub
4 changed files with 36 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
// Type definitions for puppeteer-core 1.9
// Project: https://github.com/GoogleChrome/puppeteer#readme
// Definitions by: Fumiaki Matsushima <https://github.com/mtsmfm>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
export * from "puppeteer";
@@ -0,0 +1,12 @@
import * as puppeteer from "puppeteer-core";
(async () => {
const browser = await puppeteer.connect();
const page = await browser.newPage();
await page.goto("https://example.com", {
referer: 'http://google.com',
});
await page.screenshot({ path: "example.png" });
browser.close();
})();
+16
View File
@@ -0,0 +1,16 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": ["es6", "dom", "es2017"],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": ["../"],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": ["index.d.ts", "puppeteer-core-tests.ts"]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }