Skip to content

Commit

Permalink
Merge pull request nut-tree#263 from nut-tree/feature/262/typescript-…
Browse files Browse the repository at this point in the history
…update

(nut-tree#262) Upgraded to Typescript 4.4.2 with minor adjustments
  • Loading branch information
s1hofmann authored Sep 5, 2021
2 parents 5033525 + 0be2917 commit 1893d2c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion lib/keyboard.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { sleep } from "./sleep.function";

type StringOrKey = string[] | Key[];

const inputIsString = (input: string[] | Key[]): input is string[] => {
const inputIsString = (input: (string | Key)[]): input is string[] => {
return input.every((elem: string | Key) => typeof elem === "string");
};

Expand Down
4 changes: 2 additions & 2 deletions lib/sleep.function.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export const sleep = async (ms: number) => {
return new Promise(resolve => setTimeout(resolve, ms));
return new Promise<void>(resolve => setTimeout(resolve, ms));
};

export const busyWaitForNanoSeconds = (duration: number) => {
return new Promise(res => {
return new Promise<void>(res => {
const start = process.hrtime.bigint();
let isWaiting = true;
while (isWaiting) {
Expand Down
13 changes: 6 additions & 7 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"devDependencies": {
"@types/clipboardy": "2.0.1",
"@types/jest": "25.1.4",
"@types/node": "16.7.7",
"istanbul-merge": "1.1.1",
"jest": "25.1.0",
"nyc": "15.1.0",
Expand All @@ -76,7 +77,7 @@
"ts-jest": "25.4.0",
"tslint": "6.1.0",
"typedoc": "0.17.6",
"typescript": "3.8.3",
"typescript": "4.4.2",
"version-bump-prompt": "6.0.2"
}
}

0 comments on commit 1893d2c

Please sign in to comment.