// @ts-nocheck import { CoreModels } from 'tnp-core/browser'; declare const IGNORE_BY_DEFAULT: string[]; interface StartAndWatchOptions { afterInitCallBack?: (initialParams?: INIT_PARAMS) => void; watchOnly?: boolean; /** * override task name */ taskName?: string; initialParams?: INIT_PARAMS; } type StartOptions = Omit, 'watchOnly'>; interface BaseClientCompilerOptions { taskName: string; folderPath?: string | string[]; /** * It will cache in memory previouse files * to limit async actions calls * and prevent not changed files emiting change event */ folderPathContentCheck?: string | string[]; /** * default true */ followSymlinks?: boolean; /** * Notify compiler if file is unlinked * default: false */ notifyOnFileUnlink?: boolean; /** * ignore glob folder pattern * node_modules is always ignored */ ignoreFolderPatter?: string[]; subscribeOnlyFor?: CoreModels.FileExtension[]; engine?: IncrementalWatcherOptions['engine']; } interface ParcelEvent { path: string; type: ParcelEventType; } type IncrementalWatcherAllEvents = 'all' | IncrementalWatcherEvents; type ListenerForAll = (eventName: IncrementalWatcherEvents, path: string) => void; type ListenerForSingleEvent = (path: string) => void; type Listener = ListenerForAll | ListenerForSingleEvent; interface IncrementalWatcherInstance { add(paths: string | ReadonlyArray): void; on(event: 'all', listener: ListenerForAll): this; on(event: IncrementalWatcherAllEvents, listener: ListenerForSingleEvent): this; } interface IncrementalWatcherOptions { ignored?: string[]; ignoreInitial?: boolean; followSymlinks?: boolean; name: string; /** * Default is @parcel/watcher */ engine?: 'chokidar' | '@parcel/watcher'; } type IncrementalWatcherEvents = 'add' | 'addDir' | 'change' | 'unlink' | 'unlinkDir'; type ParcelEventType = 'create' | 'update' | 'delete'; interface ChangeOfFile { datetime: Date; fileAbsolutePath: string; eventName: 'add' | 'change' | 'unlink' | 'unlinkDir'; } declare function incrementalWatcher(filesFolderPathOrPatternsToWatch: string[], watchOptions: IncrementalWatcherOptions): IncrementalWatcherInstance; declare class BaseClientCompiler implements BaseClientCompilerOptions { readonly followSymlinks: boolean; readonly subscribeOnlyFor: CoreModels.FileExtension[]; readonly executeOutsideScenario: boolean; readonly taskName: string; readonly engine: IncrementalWatcherOptions['engine']; readonly notifyOnFileUnlink: boolean; protected onlySingleRun: boolean; ignoreFolderPatter?: string[]; private pathResolve; private isInitedWithOptions; private __folderPath; lastAsyncFiles: string[]; readonly isWatchCompilation: boolean; readonly folderPathContentCheck: string[]; set folderPath(v: string[]); get folderPath(): string[]; /** * manually init options (when no passing object to constructor super() ) */ protected initOptions(options?: BaseClientCompilerOptions): void; /** * do not override this */ runTask(options?: { watch?: boolean; } & StartAndWatchOptions): Promise>; /** * @deprecated use runTask instead * Do not override this */ start(options?: StartOptions): Promise>; /** * @deprecated use runTask instead * Do not override this */ startAndWatch(options?: StartAndWatchOptions): Promise>; /** * * @param absolteFilesPathes for each watched file * @returns */ syncAction(absolteFilesPathes?: string[], initialParams?: INITIAL_PARAMS): Promise; preAsyncAction(initialParams?: INITIAL_PARAMS): Promise; asyncAction(asyncEvents: ChangeOfFile, initialParams?: INITIAL_PARAMS): Promise; getFilesFolderPatternsToWatch(): string[]; private fixAndAssignOptions; private fixTaskName; } export { BaseClientCompiler, IGNORE_BY_DEFAULT, incrementalWatcher }; export type { BaseClientCompilerOptions, ChangeOfFile, IncrementalWatcherAllEvents, IncrementalWatcherEvents, IncrementalWatcherInstance, IncrementalWatcherOptions, Listener, ListenerForAll, ListenerForSingleEvent, ParcelEvent, ParcelEventType, StartAndWatchOptions, StartOptions };