UNPKG

@typespec/compiler

Version:

TypeSpec Compiler Preview

24 lines 1.05 kB
import { CliCompilerHost } from "../core/cli/types.js"; import { Diagnostic, SourceFile } from "../core/types.js"; import { InitTemplate } from "./init-template.js"; export interface InitTypeSpecProjectOptions { readonly templatesUrl?: string; readonly template?: string; } export declare function initTypeSpecProject(host: CliCompilerHost, directory: string, options?: InitTypeSpecProjectOptions): Promise<void>; export declare function initTypeSpecProjectWorker(host: CliCompilerHost, directory: string, options?: InitTypeSpecProjectOptions): Promise<void>; export interface LoadedTemplate { readonly baseUri: string; readonly templates: Record<string, InitTemplate>; readonly file: SourceFile; } /** * Error thrown when init template acquisition fails or template is invalid. * * Contains diagnostics that can be logged to the user. */ export declare class InitTemplateError extends Error { diagnostics: readonly Diagnostic[]; constructor(diagnostics: readonly Diagnostic[]); } //# sourceMappingURL=init.d.ts.map