import { ts } from './typescript'; import { Diagnostic } from './diagnostic'; import { FileSystem } from './fs'; import { NowConfig } from './now-config'; export declare const NOW_FILE_EXTENSION = ".now.ts"; export type CompilerOptions = ts.CompilerOptions; export declare const DEFAULT_COMPILER_OPTIONS: CompilerOptions; export declare enum FluentScriptKinds { IncludeFile = 100 } export declare class Compiler extends ts.Project { private readonly fs; private readonly rootDir; private readonly sourceFileToRelativeModuleSpecifier; private readonly generatedTableFilePath; constructor(fs: FileSystem, { rootDir, sourceFilePaths, compilerOptions, tsConfigFilePath, }?: { rootDir?: string; sourceFilePaths?: string[]; compilerOptions?: CompilerOptions; tsConfigFilePath?: string; }); addGlobalTableDefinitionFile(): void; /** * Recursively adds any source files in the specified directory, and returns the added * files. Glob patterns can be supplied to control which files are added. This will also * resolve the dependencies of the added files. If the directory does not exist, an empty * array will be returned. */ addSourceFilesFromDirectory(dir: string, extensions?: string[], ignore_extensions?: string[]): ts.SourceFile[]; /** * Recursively adds any .now.ts files in the specified directory, and returns the added * files. Glob patterns can be supplied to control which files are added. This will also * resolve the dependencies of the added files. If the directory does not exist, an empty * array will be returned. */ addFluentSourceFilesFromDirectory(dir: string): ts.SourceFile[]; addFluentSourceFilesAtPaths(paths: string[]): ts.SourceFile[]; getFluentSourceFilesFromDirectory(dir: string): ts.SourceFile[]; getFluentSourceFiles(): ts.SourceFile[]; getDiagnosticsForSourceFile(fileOrPath: string | ts.SourceFile): TypeScriptDiagnostic[]; visitNodeTree(node: ts.Node, visitor: (node: ts.Node) => void): void; private getTableSchemaModule; private getTableInterface; interfaceExistsInGlobalDeclaration(tableName: string): ts.InterfaceDeclaration | undefined; propertyExistsInGlobalDeclaration(tableName: string): ts.PropertySignature | undefined; importExistsInGlobalDeclaration(resolvedModuleSpecifier: string): ts.ImportDeclaration | undefined; getGeneratedTableFile(): ts.SourceFile | undefined; addTableInterfacesToGlobalDeclaration(data: { interfaces: any; properties: any; imports: any; namedImports: any; }): void; removeTableInterfaceFromGlobalDeclaration(sourceFile: string | ts.SourceFile): void; isGeneratedTableFile(sourceFile: string | ts.SourceFile): boolean; } export declare function createCompilerWithSourceFilesFromDirectory(rootDir: string, fs: FileSystem, config: NowConfig): Compiler; export declare class TypeScriptDiagnostic extends Diagnostic { private readonly diagnostic; constructor(diagnostic: ts.Diagnostic); asTypeScriptDiagnostic(): ts.ts.Diagnostic; }