Added types for jest-environment-puppeteer

This commit is contained in:
Joshua Goldberg
2018-04-04 16:23:27 -07:00
parent 0afd9936a8
commit d252ffa70d
4 changed files with 41 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
// Type definitions for jest-environment-puppeteer 2.2
// Project: https://github.com/smooth-code/jest-puppeteer
// Definitions by: Josh Goldberg <https://github.com/joshuakgoldberg>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import { Browser, Page } from "puppeteer";
declare global {
const browser: Browser;
const page: Page;
}
export { };

View File

@@ -0,0 +1,4 @@
import * as puppeteer from "puppeteer";
const myBrowser: puppeteer.Browser = browser;
const myPage: puppeteer.Page = page;

View File

@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"jest-environment-puppeteer-tests.ts"
]
}

View File

@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }