UNPKG

652 BTypeScriptView Raw
1import { CharacterRange } from './utils';
2export interface PreciseFormatter<FormatterConfig> {
3 resolveConfig(modifiedFilePath: string): FormatterConfig | null;
4 isAlreadyFormatted(fileContents: string, formatterConfig: FormatterConfig | null): boolean;
5 checkFormattingOfRanges(fileContents: string, config: FormatterConfig | null, characterRanges: CharacterRange[]): boolean;
6 formatRanges(fileContents: string, config: FormatterConfig | null, characterRanges: CharacterRange[]): string;
7 generateIgnoreFilePredicate(workingDirectory: string): (filename: string) => boolean;
8 hasSupportedFileExtension(filename: string): boolean;
9}