diff --git a/.eslintignore b/.eslintignore index 567609b..7f0f371 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1 +1,2 @@ build/ +index.d.ts \ No newline at end of file diff --git a/.gitignore b/.gitignore index 5856b8f..8001d7d 100644 --- a/.gitignore +++ b/.gitignore @@ -63,7 +63,6 @@ typings/ **/build /*.js -*.d.ts !babel.config.js !.eslintrc.js .DS_Store diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..0620680 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,13 @@ +import { Options, Services, Capabilities } from "@wdio/types"; +declare class ChromedriverServiceLauncher { + constructor( + options: Services.ServiceOption, + capabilities: Capabilities.Capabilities, + config: Omit + ); + + onComplete(): void; + onPrepare(): void; +} +export default class ChromeDriverService {} +export declare const launcher: ChromedriverServiceLauncher; diff --git a/package.json b/package.json index 97d8f33..2c786b2 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "homepage": "https://github.com/webdriverio-community/wdio-chromedriver-service#readme", "license": "MIT", "main": "./build", + "types": "index.d.ts", "engines": { "node": ">=10.0.0" }, @@ -39,7 +40,13 @@ }, "peerDependencies": { "chromedriver": "*", - "@wdio/cli": "^7.0.0" + "@wdio/cli": "^7.0.0", + "@wdio/types": "^7.0.0" + }, + "peerDependenciesMeta": { + "@wdio/types": { + "optional": true + } }, "dependencies": { "@wdio/logger": "^7.5.3",