UNPKG

@typespec/compiler

Version:

TypeSpec compiler and standard library

9 lines (7 loc) 265 B
import { EmitContext, emitFile, resolvePath } from "@typespec/compiler"; export async function $onEmit(context: EmitContext) { await emitFile(context.program, { path: resolvePath(context.emitterOutputDir, "output.txt"), content: "Hello world\n", }); }