Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Commit

Permalink
Add typedefs (#67)
Browse files Browse the repository at this point in the history
* add types

* reference types

* don't ignore types

* don't lint typedefs

* use optional peerdep for @wdio/types

Co-authored-by: goosewobbler <[email protected]>
  • Loading branch information
goosewobbler and goosewobbler authored Jan 2, 2022
1 parent d7e497f commit 8d7fa35
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
build/
index.d.ts
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ typings/

**/build
/*.js
*.d.ts
!babel.config.js
!.eslintrc.js
.DS_Store
Expand Down
13 changes: 13 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Options, Services, Capabilities } from "@wdio/types";
declare class ChromedriverServiceLauncher {
constructor(
options: Services.ServiceOption,
capabilities: Capabilities.Capabilities,
config: Omit<Options.Testrunner, "capabilities">
);

onComplete(): void;
onPrepare(): void;
}
export default class ChromeDriverService {}
export declare const launcher: ChromedriverServiceLauncher;
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 8d7fa35

Please sign in to comment.