import { Index } from '../../ast/entity'; import { Block } from '../../ast/entity/block'; import { DataSource } from '../../ast/entity/data-source'; import { Field } from '../../ast/entity/field'; import { Table } from '../../ast/entity/table'; import { Configuration } from '../../util/configuration'; import { LogListener } from '../../util/log-listener'; export interface OutputWriter { appendContents(text: string): void; } export declare enum SourceType { TABLE = 0, FIELD = 1, UNIQUE = 2, INDEX = 3, FOREIGN = 4, CONSTRAINT = 5, REFERENCE = 6, INHERITED = 7, PRIMARY = 8, OPTION = 9, IMAGE = 10, COMMENT = 11 } export declare class SourceContext { type: SourceType; tableStack: Table[]; field: Field; index?: Index; option?: string; comment?: string; output: OutputWriter; config: Configuration; data: DataSource; position: number; } export declare abstract class Source extends Block { protected configuration: Configuration; filePathOrContents?: string; protected logger?: LogListener; encoding: string; constructor(configuration: Configuration, filePathOrContents?: string); abstract load(pathAsContent?: boolean): Promise; setLogger(logger: LogListener): void; readFile(fileName: string): Promise; writeFile(fileName: string, contents: string): Promise; }