import { SourceFile } from 'ts-morph'; import { File, FIX, FixOptions, FixResult } from '../../fix'; import { AllFormatCodeSettings } from '../formatTypes'; export interface SimpleFixConstructorActionOptions extends FixOptions { file: SourceFile; } export interface FormatSettingsFixOptions extends FixOptions { formatCodeSettings?: AllFormatCodeSettings; } export interface SimpleFixConstructorOptions { action(options: T & { file: SourceFile; }): void; name: FIX; description?: string; selectFilesMessage?: string; } /** * A very simple fix that supports format code settings as options (since most refactors will optionally use * them.). it has a shortcut for fn() - * that subclasses that execute a transformation file per file can use by passing {action} as constructor option. * * Also they can pass the rest of the info so they don't have to subclass this and just instantiate. * * See organizeImports, format. See stringConcatenationToTemplate for an example sub classing this to add a new * option. */ export declare class FormatSettingsFix { protected options?: SimpleFixConstructorOptions | undefined; name: FIX; description: string; protected _selectFilesMessage: string; constructor(options?: SimpleFixConstructorOptions | undefined); selectFilesMessage(): string; verifyInputFiles(files: File[], options: T): string | undefined; fn(options: T): FixResult; inquireOptions(options: T): Promise; protected inquireFormatCodeSettings(options: T): Promise; /** * built dummy result with modified files after the operation is executed. */ protected buildDummyFixResult(options: FixOptions): { files: { name: string; time: number; }[]; }; }