Skip to content

[I] CompilerOptions

Configuration for a compilation, including source loading, diagnostics, linting, and emission.

PropertyTypeDescription
additionalImports?string[]Import these modules in addition to imports declared by the entry-point source.
config?stringPath to config YAML file used, this is also where the project root should be.
designTimeBuild?booleanWhen true, indicates that a compilation is being performed for live analysis in the language server.
dryRun?booleanRuns emitters but do not write any output. Only runs emitters supporting this functionality
emit?string[]List or path to emitters to use.
ignoreDeprecated?booleanSuppress all deprecated warnings.
linterRuleSet?LinterRuleSetRuleset to enable for linting.
listFiles?booleanList emitted outputs and their paths.
miscOptions?Record<string, unknown>Additional options made available to compiler integrations through program option lookup.
noEmit?booleanDo not run emitters. Same as setting emit: [] If both emit and noEmit are set, noEmit takes precedence.
nostdlib?booleanSkip loading the compiler’s standard TypeSpec library.
options?Record<string, EmitterOptions>Emitter-specific settings keyed by the resolved library metadata name. Use the original emitter specifier only when no metadata name is available.
outputDir?stringDefault output directory used by emitters. Default ./tsp-output
parseOptions?ParseOptionsParser settings applied when loading TypeSpec source files.
trace?string[]Trace area to enable.
warningAsError?booleanPromote unsuppressed warnings to errors, causing the compilation to fail.