mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 19:08:15 +00:00
BREAKING CHANGE: rename Deno.fsEvents() to Deno.watchFs() (#4886)
This commit is contained in:
parent
6a37e4426e
commit
824329f0da
5 changed files with 18 additions and 20 deletions
|
@ -7,7 +7,7 @@ export interface FsEvent {
|
|||
paths: string[];
|
||||
}
|
||||
|
||||
class FsEvents implements AsyncIterableIterator<FsEvent> {
|
||||
class FsWatcher implements AsyncIterableIterator<FsEvent> {
|
||||
readonly rid: number;
|
||||
|
||||
constructor(paths: string[], options: { recursive: boolean }) {
|
||||
|
@ -31,9 +31,9 @@ class FsEvents implements AsyncIterableIterator<FsEvent> {
|
|||
}
|
||||
}
|
||||
|
||||
export function fsEvents(
|
||||
export function watchFs(
|
||||
paths: string | string[],
|
||||
options = { recursive: true }
|
||||
): AsyncIterableIterator<FsEvent> {
|
||||
return new FsEvents(Array.isArray(paths) ? paths : [paths], options);
|
||||
return new FsWatcher(Array.isArray(paths) ? paths : [paths], options);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue