export default abstract class AssetPreCompiler { protected readonly targetDir: string; protected readonly assetType: string; protected readonly extension: string; private readonly outputToPublicDir; protected readonly assetPaths: string[]; private watcher?; private afterPreCompileHandlers; private inputChangeHandler?; private hadError; /** * @param targetDir The directory to put pre-compiled assets into. * @param assetType This must be the assets sub-directory name of the asset type this pre-compiler will handle. * Example: ts * Example: views * @param extension The asset files extension. * @param outputToPublicDir should the assets be compiled into the publicly served directory? * @param additionalFallbackAssetPaths By order of priority, fallback asset directories. * Swaf provided assets and default ./assets directory are automatically added (don't add them yourself). */ protected constructor(targetDir: string, assetType: string, extension: string, outputToPublicDir: boolean, ...additionalFallbackAssetPaths: string[]); getExtension(): string; isPublic(): boolean; getViewPaths(): string[]; stop(): Promise; abstract preCompile(canonicalName: string, alsoCompileDependents: boolean): Promise; onPreCompile(afterPreCompileHandler: (watch: boolean) => Promise): void; protected afterPreCompile(watch: boolean): Promise; preCompileAll(watch: boolean): Promise; watch(): Promise; onNewFile(file: string): Promise; onFileChange(file: string): Promise; onFileRemove(file: string): Promise; onInputChange(inputChangeHandler: (restart: boolean) => Promise): void; protected toCanonicalName(file: string): string; protected resolveFileFromCanonicalName(canonicalName: string): Promise; protected resolveFileFromCanonicalNameOrFail(canonicalName: string): Promise; }