Skip to content

Commit

Permalink
Update typescript dependency, and fix new errors with typings
Browse files Browse the repository at this point in the history
  • Loading branch information
dsagal committed Nov 13, 2022
1 parent be16b3e commit bb61dcd
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ async function rerun(files: string[], i: number = 0) {
const origProcessOn = ignoreUncaughtExceptionListeners(process.on);
try {
// This is the fromCallback() idiom without the fromCallback() helper.
await new Promise((resolve, reject) => mocha.run((err) => err ? reject(err) : resolve()));
await new Promise<void>((resolve, reject) => mocha.run((err) => err ? reject(err) : resolve()));
} finally {
process.on = origProcessOn;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/serialize-calls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function serializeCalls<Func extends PromiseFunc>(method: Func, maxPendin

// Wrapped version of the passed-in method.
function serializedMethod(this: any, ...args: any[]) {
const ready = new Promise((resolve) => queue.push(resolve));
const ready = new Promise<void>((resolve) => queue.push(resolve));

// If we can make a call immediately, checkQueue() will call the resolver, so that ready will
// be an already-resolved promise.
Expand Down
3 changes: 3 additions & 0 deletions lib/webdriver-plus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ class WebElementRect implements ClientRect {
get bottom(): number { return this.rect.y + this.rect.height; }
get left(): number { return this.rect.x; }
get right(): number { return this.rect.x + this.rect.width; }
get x(): number { return this.rect.x; }
get y(): number { return this.rect.y; }
public toJSON() { return this.rect; }
}

// A version of `new WebElementCondition` that doesn't complain about correct types.
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"color-string": "^1.5.3",
"ts-node": "^8.1.0",
"tslint": "^5.16.0",
"typescript": "^3.4.5",
"typescript": "^4.8.4",
"typescript-tslint-plugin": "^0.3.1"
}
}
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"strict": true,
"noImplicitAny": true,
"noUnusedLocals": true,
"useUnknownInCatchVariables": false,
"declaration": true,
"sourceMap": true,
"outDir": "dist",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1711,10 +1711,10 @@
"mock-require" "^3.0.2"
"vscode-languageserver" "^5.1.0"

"typescript@^3.4.5", "typescript@>=2.0", "typescript@>=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev", "typescript@>=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev":
"integrity" "sha512-YycBxUb49UUhdNMU5aJ7z5Ej2XGmaIBL0x34vZ82fn3hGvD+bgrMrVDpatgz2f7YxUMJxMkbWxJZeAvDxVe7Vw=="
"resolved" "https://registry.npmjs.org/typescript/-/typescript-3.4.5.tgz"
"version" "3.4.5"
"typescript@^4.8.4", "typescript@>=2.0", "typescript@>=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev", "typescript@>=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev":
"integrity" "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ=="
"resolved" "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz"
"version" "4.8.4"

"universalify@^0.1.0":
"integrity" "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg=="
Expand Down

0 comments on commit bb61dcd

Please sign in to comment.