UNPKG

tolkfmt-test-dev

Version:

Code formatter for the Tolk programming language

19 lines 687 B
import type { Node } from "web-tree-sitter"; export interface ImportInfo { readonly node: Node; readonly path: string; readonly category: ImportCategory; readonly subcategory: number; } export declare enum ImportCategory { stdlib = 0, relativeCurrent = 1, relativeNested = 2, relativeParent = 3, absolute = 4 } export declare function extractImportPath(node: Node): string; export declare function categorizeImport(path: string): ImportCategory; export declare function getImportSubcategory(path: string, category: ImportCategory): number; export declare function sortImports(imports: ImportInfo[]): ImportInfo[]; //# sourceMappingURL=imports.d.ts.map