mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
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:
@@ -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);
|
||||
});
|
||||
|
||||
|
||||
2
packages/native/index.d.ts
vendored
2
packages/native/index.d.ts
vendored
@@ -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) */
|
||||
|
||||
Reference in New Issue
Block a user