@typespec/http-server-js
Version:
TypeSpec HTTP server code generator for JavaScript
23 lines • 1.03 kB
TypeScript
import { Program, Service } from "@typespec/compiler";
import type { OpenAPI3ServiceRecord, SupportedOpenAPIDocuments } from "@typespec/openapi3";
/**
* Attempts to import the OpenAPI 3 emitter if it is installed.
*
* @returns the OpenAPI 3 emitter module or undefined
*/
export declare function getOpenApi3Emitter(): Promise<typeof import("@typespec/openapi3") | undefined>;
/**
* Gets the OpenAPI 3 service record for a given service.
*
* @param program - the program in which the service occurs
* @param service - the service to check
*/
export declare function getOpenApi3ServiceRecord(program: Program, service: Service): Promise<OpenAPI3ServiceRecord | undefined>;
/**
* Determines if an OpenAPI3 document can be generated for the given service.
*
* @param program - the program in which the service occurs
* @param service - the service to check
*/
export declare function tryGetOpenApi3(program: Program, service: Service): Promise<SupportedOpenAPIDocuments | undefined>;
//# sourceMappingURL=openapi3.d.ts.map