This commit is contained in:
Your Name
2026-08-11 17:41:36 +08:00
parent cfe4c82c90
commit 03fe4ddf9d
18771 changed files with 3617239 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
/// <reference types="node" />
import { type FSWatcher, type WatchOptions } from 'chokidar';
type FileTransform = (source: Buffer, filename: string) => void | string;
export interface FileWatcherOptions {
src: string | string[];
dest: string;
transform?: FileTransform;
}
export declare class FileWatcher {
private src;
private dest;
private transform?;
private watcher;
private onChange?;
constructor({ src, dest, transform }: FileWatcherOptions);
watch(watchOptions: WatchOptions & {
cwd: string;
readyTimeout?: number;
}, onReady?: (watcher: FSWatcher) => void, onChange?: () => void): FSWatcher;
add(paths: string | ReadonlyArray<string>): FSWatcher;
unwatch(paths: string | ReadonlyArray<string>): FSWatcher;
close(): Promise<void>;
copy(from: string): void;
remove(from: string): void;
info(type: 'close' | 'copy' | 'remove' | 'add' | 'unwatch', msg?: string | unknown): void;
from(from: string): string;
to(from: string): string;
}
export {};