UNPKG

rexuws

Version:

An express-like framework built on top of uWebsocket.js aims at simple codebase and high performance

17 lines (16 loc) 529 B
/// <reference types="node" /> import fs from 'fs'; export interface IWatcherCallbackToEvents { add: (baseUrl: string, path: string, stats?: fs.Stats) => void; unlink: (baseUrl: string, path: string) => void; change?: (baseUrl: string, path: string, stats?: fs.Stats) => void; } export default class FileWatcher { private _aliases; private _watcher; private _callbacks; private _ready; constructor(aliases: string[], cb: IWatcherCallbackToEvents); private getRelativePath; private init; }