mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Merge pull request #30080 from mtsmfm/puppeteer-core
[puppeteer-core] Create types for puppeteer-core
This commit is contained in:
Vendored
+7
@@ -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();
|
||||
})();
|
||||
@@ -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"]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user