diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..93d3a78 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,27 @@ +declare module 'browserstack-local' { + interface Options { + key: string + verbose: boolean + force: boolean + only: string + onlyAutomate: boolean + forceLocal: boolean + localIdentifier: string + folder: string + proxyHost: string + proxyPort: string + proxyUser: string + proxyPass: string + forceProxy: boolean + logFile: string + parallelRuns: string + binarypath: string + [key: string]: string | boolean + } + + class Local { + start(options: Partial, callback: () => void): void + isRunning(): boolean + stop(callback: () => void): void + } +} \ No newline at end of file diff --git a/package.json b/package.json index 2800593..60ba60e 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "description": "Nodejs bindings for BrowserStack Local", "engine": "^0.10.44", "main": "index.js", + "types": "index.d.ts", "scripts": { "pretest": "./node_modules/.bin/eslint lib/* index.js", "test": "./node_modules/.bin/mocha"