UNPKG

sortier

Version:
28 lines (27 loc) 1.28 kB
import { SortContentsOptions } from "../sortContents/index.js"; import { SortImportDeclarationSpecifiersOptions } from "../sortImportDeclarationSpecifiers/index.js"; import { SortImportDeclarationsOrderOption } from "../sortImportDeclarations/index.js"; import { SortierOptions as BaseSortierOptions } from "../../config/index.js"; import { ILanguage } from "../../language.js"; import { TypeAnnotationOption } from "../utilities/sort-utils.js"; export type SortierOptions = Partial<JsSortierOptionsRequired>; interface JsSortierOptionsRequired { parser?: "flow" | "typescript"; sortContents?: SortContentsOptions; sortImportDeclarationSpecifiers?: SortImportDeclarationSpecifiersOptions; sortImportDeclarations?: SortImportDeclarationsOrderOption; sortTypeAnnotations?: TypeAnnotationOption[]; } export declare class Reprinter implements ILanguage { static readonly EXTENSIONS: string[]; private _filename; private _helpModeHasPrintedFilename; private _options; getRewrittenContents(filename: string, fileContents: string, options: BaseSortierOptions): string; isFileSupported(filename: string): boolean; private getValidatedOptions; private getParser; private rewriteNodes; private printHelpModeInfo; } export {};