barro
Version:
Flexible barrel file generation for Javascript and Typescript with watching built-in.
7 lines (6 loc) • 352 B
TypeScript
import { Barrel } from "./types/Barrel";
declare type EventType = "add" | "unlink" | "unlinkDir";
declare type CancelWatchFn = () => void;
declare type OnChangeFn = (eventType: EventType, filepath: string, isCancelled: () => boolean) => unknown;
export declare function watchBarrelFiles(barrel: Barrel, onChange: OnChangeFn): CancelWatchFn;
export {};