import ts from 'typescript'; export declare const isPlacementWord: (token: string) => boolean; export interface ClassUnit { /** Every class of the list, placement included, as written. */ tokens: string[]; /** Its look words only. */ look: string[]; /** Offsets in the file, for a report. */ start: number; end: number; /** A `className` (resolved through the file), or a string that is a class list on its own. */ via: 'attribute' | 'literal'; /** Where an escape for it is read: the element a `className` is on, or the string itself. */ anchor: number; /** The value of an exported `…_CLASSES` constant: a shared look, where it is written once. */ shared: boolean; } /** * Every class list a file writes. `follow` resolves a name the file imports, * for a part's own look: what it draws includes a look it takes from a shared * file. A list being checked is never followed — using a shared look is not * copying it. */ export declare function classUnits(source: ts.SourceFile, follow?: (name: string) => ts.Expression | undefined): ClassUnit[]; /** The function components a file declares, by name, with where each one's body is. */ export declare function componentsOf(source: ts.SourceFile): Map; /** A look is worth comparing when it has this many look words at least: fewer is a text style, not a part. */ export declare const MIN_LOOK_WORDS = 4; /** * Each named component's looks: its class lists' look words, one space-joined * string per list, those with `MIN_LOOK_WORDS` or more. A list written outside * every component of the file (a top-level constant, a class map) belongs to * every component in it. */ export declare function looksOf(source: ts.SourceFile, names?: Iterable): Map; /** Read and parse a file for looks. */ export declare function parseForLooks(fileName: string, text: string): ts.SourceFile; /** How much of a look a class list must share to be a copy of it (UIG-25, Katerina 24 September). */ export declare const MIN_SHARED = 4; export declare const MIN_COVER = 0.8; /** The look words a list shares with a look, when it is a copy of it; otherwise null. */ export declare function copies(list: string[], look: string[]): string[] | null; /** A resolver for the class constants a file imports from its own repo: `FIELD_BOX_CLASSES` from `./looks`. */ export declare function importedConstants(source: ts.SourceFile): (name: string) => ts.Expression | undefined; /** * The shared looks a file declares: each exported `…_CLASSES` constant, a string * or a map of strings, by name (`FIELD_SIZE_CLASSES.small`). A hand-typed copy of * one is told to use it. */ export declare function sharedLooksOf(source: ts.SourceFile): Map; //# sourceMappingURL=looks-of.d.ts.map