import-sort
Version:
Sort ES2015 (aka ES6) imports programmatically.
16 lines • 675 B
TypeScript
import { IParser } from "import-sort-parser";
import { IStyle } from "import-sort-style";
export interface ISortResult {
code: string;
changes: ICodeChange[];
}
export interface ICodeChange {
start: number;
end: number;
code: string;
note?: string;
}
export default function importSort(code: string, rawParser: string | IParser, rawStyle: string | IStyle, file?: string, options?: object): ISortResult;
export declare function sortImports(code: string, parser: IParser, style: IStyle, file?: string, options?: object): ISortResult;
export declare function applyChanges(code: string, changes: ICodeChange[]): string;
//# sourceMappingURL=index.d.ts.map