build: perform TypeCheck for all packages (#2573)

Co-authored-by: himself65 <himself65@outlook.com>
Co-authored-by: Peng Xiao <pengxiao@outlook.com>
This commit is contained in:
LongYinan
2023-05-31 20:49:56 +08:00
committed by GitHub
parent 78410f531a
commit 1ea445ab15
81 changed files with 434 additions and 241 deletions

View File

@@ -7,21 +7,20 @@ import { fileURLToPath } from 'node:url';
import { lastValueFrom, Subject } from 'rxjs';
import { v4 } from 'uuid';
import type { FSWatcher } from '../index';
import { watch } from '../index.js';
import { FsWatcher } from '../index';
test('fs watch', { concurrency: false }, async t => {
let watcher: FSWatcher;
let watcher: FsWatcher;
let fixture: string;
t.beforeEach(async () => {
const fixtureName = `fs-${v4()}.fixture`;
fixture = join(fileURLToPath(import.meta.url), '..', fixtureName);
await fs.writeFile(fixture, '\n');
watcher = watch(fixture);
watcher = FsWatcher.watch(fixture);
});
t.afterEach(async () => {
watcher.close();
FsWatcher.close();
await fs.unlink(fixture).catch(() => false);
});

View File

@@ -7,7 +7,7 @@ export interface WatchOptions {
recursive?: boolean;
}
/** Watcher kind enumeration */
export const enum WatcherKind {
export enum WatcherKind {
/** inotify backend (linux) */
Inotify = 'Inotify',
/** FS-Event backend (mac) */