groovy-beautify
Version:
A simple beautifier which allows formatting and indenting Groovy scripts
12 lines (11 loc) • 360 B
TypeScript
import { CodeBlock } from "../parser/types";
import FormatRule from "./FormatRule";
export declare type FormatterOptions = {
width: number;
};
export declare class Formatter {
rules: FormatRule[];
options: FormatterOptions;
constructor(rules?: Array<typeof FormatRule>, options?: FormatterOptions);
format(obj: CodeBlock, indent?: number): string;
}