export interface EmitTarget { type: string; "output-dir"?: string; "test-dir"?: string; "namespace-output"?: "structural" | "flat"; outputs?: EmitTargetOutput[]; alias?: { [key: string]: any; }; format?: FormatterOption; namespace?: string; "import-path"?: string; "package-name"?: string; "enum-parsing"?: "case-sensitive" | "case-insensitive"; "protocol-scaffolds"?: "none" | "compile-only"; "cancellation-token-path"?: string; "vector-adapter-path"?: string; "test-resources"?: string[]; "harness-test-dir"?: string; "native-serialization"?: "none" | "pydantic" | "jackson" | "serde" | "zod" | "standard-schema" | "codable"; } export interface EmitTargetOutput { kind: string; provider?: string; } /** * A single consumer-declared formatter invocation for a target's post-emit * pass. Supplying one (or an array) as {@link EmitTarget.format} replaces the * built-in per-language formatter with the consumer's own command, turning the * previously implicit host-tool dependency into an explicit, declared one. * * `args` support `{dir}` (the emitted output directory) and `{testDir}` (the * generated test directory, when the target emits one) placeholders; an * argument that references `{testDir}` is dropped when no test directory * exists. When `args` is omitted the command is invoked as `command {dir}`. * * Because a `{testDir}` argument is dropped wholesale when no test directory * exists, prefer a self-contained combined form (e.g. `--include={testDir}`) * over a separate flag/value pair (`["--include", "{testDir}"]`) so no dangling * flag is left behind. A custom command also replaces the built-in formatter * entirely and runs over the whole output tree, so any per-file exclusions the * built-in applied (e.g. create-once editable helpers) are the consumer's * responsibility to reproduce in their own command's ignore configuration. */ export interface FormatterCommand { command: string; args?: string[]; version?: string; "version-args"?: string[]; } /** * Formatter selection for a target's post-emit pass: `true`/unset runs the * built-in per-language formatter, `false` disables formatting entirely, and a * {@link FormatterCommand} (or array of them) runs consumer-declared commands * instead. */ export type FormatterOption = boolean | FormatterCommand | FormatterCommand[]; export interface TypraEmitterOptions { "root-object": string; "emit-targets"?: EmitTarget[]; "root-namespace"?: string; "root-alias"?: string; "namespace-output"?: "structural" | "flat"; "omit-models"?: string[]; "schema-output-dir"?: string; "additional-roots"?: string[]; "allow-unsupported-typespec-version"?: boolean; "protected-paths"?: string[]; "hydration-zones"?: string[]; "deterministic-output"?: boolean; } export declare const $lib: import("@typespec/compiler").TypeSpecLibrary<{ [code: string]: import("@typespec/compiler").DiagnosticMessages; }, TypraEmitterOptions, "samples" | "coercions" | "abstracts" | "factories" | "operationEffects" | "knownAs" | "defaultFor" | "dispatch" | "serializable" | "sensitive" | "vectors" | "parseAliases" | "entryShorthands">; export declare const reportDiagnostic: (program: import("@typespec/compiler").Program, diag: import("@typespec/compiler").DiagnosticReport<{ [code: string]: import("@typespec/compiler").DiagnosticMessages; }, C, M>) => void, createDiagnostic: (diag: import("@typespec/compiler").DiagnosticReport<{ [code: string]: import("@typespec/compiler").DiagnosticMessages; }, C, M>) => import("@typespec/compiler").Diagnostic; export declare const StateKeys: Record<"samples" | "coercions" | "abstracts" | "factories" | "operationEffects" | "knownAs" | "defaultFor" | "dispatch" | "serializable" | "sensitive" | "vectors" | "parseAliases" | "entryShorthands", symbol>;