@typespec/compiler
Version:
TypeSpec compiler and standard library
24 lines • 1.11 kB
TypeScript
import { Diagnostic, SystemHost } from "../core/types.js";
import { TypeSpecConfig } from "./types.js";
export declare const TypeSpecConfigFilename = "tspconfig.yaml";
export declare const defaultConfig: {
outputDir: string;
diagnostics: Diagnostic[];
};
/**
* Look for the project root by looking up until a `tspconfig.yaml` is found.
* @param path Path to the file or the folder to start looking
*/
export declare function findTypeSpecConfigPath(host: SystemHost, path: string, lookup?: boolean): Promise<string | undefined>;
/**
* Load the TypeSpec configuration for the provided path or directory
* @param host
* @param path
*/
export declare function loadTypeSpecConfigForPath(host: SystemHost, path: string, errorIfNotFound?: boolean, lookup?: boolean): Promise<TypeSpecConfig>;
/**
* Load given file as a TypeSpec configuration
*/
export declare function loadTypeSpecConfigFile(host: SystemHost, filePath: string): Promise<TypeSpecConfig>;
export declare function validateConfigPathsAbsolute(config: TypeSpecConfig): readonly Diagnostic[];
//# sourceMappingURL=config-loader.d.ts.map