ts-comment-remover
Version:
TypeScript file compression tool that removes comments and unnecessary whitespace using AST
46 lines • 1.29 kB
TypeScript
export type CompressOptions = Readonly<{
targetDir: string;
outputFile?: string;
includePatterns?: readonly string[];
excludePatterns?: readonly string[];
preserveStructure?: boolean;
verbose?: boolean;
interactive?: boolean;
}>;
export type FileStats = Readonly<{
originalSize: number;
compressedSize: number;
ratio: number;
}>;
export type ProcessedFile = Readonly<{
path: string;
originalContent: string;
compressedContent: string;
stats: FileStats;
}>;
export type CompressResult = Readonly<{
files: readonly ProcessedFile[];
totalStats: FileStats;
output: string;
}>;
export type FileFilter = (fileName: string) => boolean;
export type CompressFunction = (content: string) => string;
export type IOEffect<T> = () => Promise<T>;
export type Either<E, A> = {
readonly _tag: 'Left';
readonly left: E;
} | {
readonly _tag: 'Right';
readonly right: A;
};
export declare const left: <E, A>(e: E) => Either<E, A>;
export declare const right: <E, A>(a: A) => Either<E, A>;
export declare const isLeft: <E, A>(e: Either<E, A>) => e is {
_tag: "Left";
left: E;
};
export declare const isRight: <E, A>(e: Either<E, A>) => e is {
_tag: "Right";
right: A;
};
//# sourceMappingURL=types.d.ts.map