@blitzjs/file-pipeline
Version:
Display package for the Blitz CLI
23 lines (22 loc) • 838 B
TypeScript
/// <reference types="node" />
import File from "vinyl";
import { FileCacheEntry, FileCacheInterface } from "../types";
export declare class FileCache implements FileCacheInterface {
fileCache: Record<string, FileCacheEntry>;
delete(file: File): void;
add(file: File): void;
filterByPath(filterFn: (a: string) => boolean): FileCacheEntry[];
filter(filterFn: (a: FileCacheEntry) => boolean): FileCacheEntry[];
toString(): string;
toPaths(): string[];
static create(): FileCache;
}
/**
* Provides a file cache of the files running through the stream
* The cache can be used elsewhere in the stream for dynamic analysis
* of multiple files.
*/
export declare function createFileCache(filter?: (a: File) => boolean): {
stream: import("stream").Transform;
cache: FileCache;
};