@typespec/http-server-js
Version:
TypeSpec HTTP server code generator for JavaScript
23 lines • 1.23 kB
TypeScript
import { JsContext, Module } from "./ctx.js";
import { OnceQueue } from "./util/once-queue.js";
/**
* Writes the tree of modules to the output directory.
*
* @param ctx - The emitter context.
* @param baseOutputPath - The base output directory to write the module tree to.
* @param rootModule - The root module to begin emitting from.
* @param format - Whether to format the output using Prettier.
*/
export declare function writeModuleTree(ctx: JsContext, baseOutputPath: string, rootModule: Module, format: boolean): Promise<void>;
/**
* Write a single module file to the output directory.
*
* @param ctx - The emitter context.
* @param baseOutputPath - The base output directory to write the module tree to.
* @param module - The module to write.
* @param queue - The queue of modules to write.
* @param format - Whether to format the output using Prettier.
* @param spit - The function used to write the file to disk (default: `ctx.program.host.writeFile`).
*/
export declare function writeModuleFile(ctx: JsContext, baseOutputPath: string, module: Module, queue: OnceQueue<Module>, format: boolean, spit?: (path: string, contents: string) => Promise<void>): Promise<void>;
//# sourceMappingURL=write.d.ts.map