Skip to content

Commit e4e2a82

Browse files
committed
feat: add types
This compiles the project with `tsc` and publishes type declarations. - All of `lib` is typed. some typing bugs were corrected - types for `appium-adb` are stubbed, since that package also needs types - `test` is untyped b/c it's a wreck - removes babel - upgrades eslint - removes `pre-commit` for `husky`
1 parent 17bd442 commit e4e2a82

15 files changed

+759
-390
lines changed

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

.gitattributes

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
* text=auto eol=lf
2+
3+
# Handle as a text file but merge as binary.
4+
package-lock.json merge=binary

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npm run lint-staged

.mocharc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module.exports = {
2-
require: ['@babel/register'],
2+
require: ['ts-node/register'],
33
forbidOnly: Boolean(process.env.CI)
44
};

babel.config.json

-25
This file was deleted.

index.js

+9
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,12 @@ import ChromedriverStorageClient from './lib/storage-client';
33

44
export { ChromedriverStorageClient };
55
export default chromedriver;
6+
7+
/**
8+
* @typedef {import('./lib/types').ChromedriverOpts} ChromedriverOpts
9+
* @typedef {import('./lib/types').ChromedriverDetails} ChromedriverDetails
10+
* @typedef {import('./lib/types').ChromedriverVersionMapping} ChromedriverVersionMapping
11+
* @typedef {import('./lib/types').ChromedriverStorageClientOpts} ChromedriverStorageClientOpts
12+
* @typedef {import('./lib/types').SyncOptions} SyncOptions
13+
* @typedef {import('./lib/types').OSInfo} OSInfo
14+
*/

0 commit comments

Comments
 (0)