Add typings for chromedriver. (#25380)

This commit is contained in:
Peter Safranek
2018-04-27 23:41:32 -07:00
committed by Wesley Wigham
parent 447e24325a
commit 01a1a5649b
4 changed files with 49 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
import * as chromeDriver from 'chromedriver';
import { ChildProcess } from 'child_process';
const chromeDriverPath: string = chromeDriver.path;
const chromeDriverVersion: string = chromeDriver.version;
chromeDriver.start();
chromeDriver.stop();
const driverProcess: ChildProcess = chromeDriver.start(['a', 'b', 'c']);
const chromeDriverDefaultInstance: ChildProcess | undefined = chromeDriver.defaultInstance;
+14
View File
@@ -0,0 +1,14 @@
// Type definitions for chromedriver 2.38
// Project: https://github.com/giggio/node-chromedriver
// Definitions by: Peter Safranek <https://github.com/pe8ter>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
import { ChildProcess } from 'child_process';
export const path: string;
export const version: string;
export function start(args?: ReadonlyArray<string>): ChildProcess;
export function stop(): void;
export let defaultInstance: ChildProcess | undefined;
+23
View File
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"chromedriver-tests.ts"
]
}
+1
View File
@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }