UNPKG

@lpc-lang/core

Version:
47 lines 2.98 kB
import { CompilerOptions, Diagnostic, FileExtensionInfo, JsonSourceFile, LpcConfigSourceFile, ParseConfigHost, ParsedCommandLine, ParsedLpcConfig, Path, WatchOptions } from "./_namespaces/lpc"; export declare const libEntries: [string, string][]; /** * Parse the contents of a config file (tsconfig.json). * @param jsonNode The contents of the config file to parse * @param host Instance of ParseConfigHost used to enumerate files in folder. * @param basePath A root directory to resolve relative path entries in the config * file to. e.g. outDir */ export declare function parseLpcSourceFileConfigFileContent(sourceFile: LpcConfigSourceFile, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: readonly FileExtensionInfo[], /*extendedConfigCache?: Map<string, ExtendedConfigCacheEntry>, */ existingWatchOptions?: WatchOptions): ParsedCommandLine; export type DiagnosticReporter = (diagnostic: Diagnostic) => void; export interface ExtendedConfigCacheEntry { extendedResult: LpcConfigSourceFile; extendedConfig: ParsedLpcConfig | undefined; } /** * Convert the json syntax tree into the json value */ export declare function convertToObject(sourceFile: JsonSourceFile, errors: Diagnostic[]): any; /** * Parse the contents of a config file (tsconfig.json). * @param jsonNode The contents of the config file to parse * @param host Instance of ParseConfigHost used to enumerate files in folder. * @param basePath A root directory to resolve relative path entries in the config * file to. e.g. outDir */ export declare function parseJsonSourceFileConfigFileContent(sourceFile: LpcConfigSourceFile, host: ParseConfigHost, basePath: string, existingOptions?: CompilerOptions, configFileName?: string, resolutionStack?: Path[], extraFileExtensions?: readonly FileExtensionInfo[], extendedConfigCache?: Map<string, ExtendedConfigCacheEntry>, existingWatchOptions?: WatchOptions): ParsedCommandLine; /** * Reports config file diagnostics */ export interface ConfigFileDiagnosticsReporter { /** * Reports unrecoverable error when parsing config file */ onUnRecoverableConfigFileDiagnostic: DiagnosticReporter; } /** * Interface extending ParseConfigHost to support ParseConfigFile that reads config file and reports errors */ export interface ParseConfigFileHost extends ParseConfigHost, ConfigFileDiagnosticsReporter { getCurrentDirectory(): string; } /** * Reads the config file, reports errors if any and exits if the config file cannot be found */ export declare function getParsedCommandLineOfConfigFile(configFileName: string, optionsToExtend: CompilerOptions | undefined, host: ParseConfigFileHost, extendedConfigCache?: Map<string, ExtendedConfigCacheEntry>, watchOptionsToExtend?: WatchOptions, extraFileExtensions?: readonly FileExtensionInfo[]): ParsedCommandLine | undefined; //# sourceMappingURL=commandLineParser.d.ts.map