Skip to content

Commit a851e8b

Browse files
authored
Merge pull request #1158 from alan-agius4/test-async
2 parents b37688a + 7230778 commit a851e8b

File tree

5 files changed

+3177
-2
lines changed

5 files changed

+3177
-2
lines changed

.github/workflows/lint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@ jobs:
2121

2222
- name: Run lint
2323
run: npm run lint
24+
25+
- name: Run dtslint
26+
run: npm run dtslint

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"rimraf": "^3.0.0",
3535
"sinon": "^9.0.1",
3636
"sinon-chai": "^3.3.0",
37+
"typescript": "~4.4.3",
3738
"upath": "^1.2.0"
3839
},
3940
"files": [

types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import * as fs from "fs";
66
import { EventEmitter } from "events";
7-
import { Matcher } from 'anymatch'
7+
import { Matcher } from 'anymatch';
88

99
export class FSWatcher extends EventEmitter implements fs.FSWatcher {
1010
options: WatchOptions;

types/test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ watcher.add(["new-file-2", "new-file-3", "**/other-file*"]);
5252
watcher.unwatch("new-file*");
5353

5454
// Only needed if watching is `persistent: true`.
55-
watcher.close();
55+
(async () => {
56+
await watcher.close();
57+
})();
5658

5759
// One-liner
5860
chokidar

0 commit comments

Comments
 (0)