UNPKG

groovy-beautify

Version:

A simple beautifier which allows formatting and indenting Groovy scripts

15 lines (14 loc) 634 B
import { CodeBlock } from "../parser/types"; import { Formatter } from "./Formatter"; export default class FormatRule { formatter: Formatter; constructor(formatter: Formatter); matches(cb: CodeBlock, siblings?: CodeBlock[]): boolean; afterSelf(nextText: string, indent: number): string; beforeSelf(prevText: string, indent: number, newLine: boolean): string; beforeChild(childText: string, indent: number): string; formatStart(cb: CodeBlock, indent: number): string; formatEnd(cb: CodeBlock, indent: number): string; allowBreak(cb: CodeBlock): boolean; formatChildren(parent: CodeBlock, indent: number): string; }