UNPKG

@typespec/openapi3

Version:

TypeSpec library for emitting OpenAPI 3.0 and OpenAPI 3.1 from the TypeSpec REST protocol binding and converting OpenAPI3 to TypeSpec

45 lines 1.37 kB
import { SourceFile } from "@typespec/compiler"; export interface CliHost { logger: Logger; /** read a file at the given url. */ readUrl(url: string): Promise<SourceFile>; /** * Write the file. * @param path Path to the file. * @param content Content of the file. */ writeFile(path: string, content: string): Promise<void>; /** * Read directory. * @param path Path to the directory. * @returns list of file/directory in the given directory. Returns the name not the full path. */ readDir(path: string): Promise<string[]>; /** * Deletes a directory or file. * @param path Path to the directory or file. */ rm(path: string, options?: RmOptions): Promise<void>; /** * create directory recursively. * @param path Path to the directory. */ mkdirp(path: string): Promise<string | undefined>; } export interface RmOptions { /** * If `true`, perform a recursive directory removal. In * recursive mode, errors are not reported if `path` does not exist, and * operations are retried on failure. * @default false */ recursive?: boolean; } export interface Logger { trace(message: string): void; warn(message: string): void; error(message: string): void; } export interface CliHostArgs { } //# sourceMappingURL=types.d.ts.map