UNPKG

@stylable/core

Version:

CSS for Components

24 lines 970 B
export declare type processFn<T> = (fullpath: string, content: string) => T; export interface CacheItem<T> { value: T; stat: { mtime: Date; }; } export interface MinimalFS { statSync: (fullpath: string) => { mtime: Date; }; readFileSync: (fullpath: string, encoding: 'utf8') => string; readlinkSync(path: string): string; } export interface FileProcessor<T> { process: (fullpath: string, ignoreCache?: boolean, context?: string) => T; add: (fullpath: string, value: T) => void; processContent: (content: string, fullpath: string) => T; cache: Record<string, CacheItem<T>>; postProcessors: Array<(value: T, path: string) => T>; resolvePath: (path: string, context?: string) => string; } export declare function cachedProcessFile<T = any>(processor: processFn<T>, fs: MinimalFS, resolvePath: (path: string, context?: string) => string): FileProcessor<T>; //# sourceMappingURL=cached-process-file.d.ts.map