Skip to main content
Version: Next 🚧

Emitter

Usage

  1. Via the command line
tsp compile . --emit=@typespec/protobuf
  1. Via the config
emit:
- "@typespec/protobuf"

The config can be extended with options as follows:

emit:
- "@typespec/protobuf"
options:
"@typespec/protobuf":
option: value

Emitter options

noEmit

Type: boolean

If set to true, this emitter will not write any files. It will still validate the TypeSpec sources to ensure they are compatible with Protobuf, but the files will simply not be written to the output directory.

omit-unreachable-types

Type: boolean

By default, the emitter will create message declarations for any models in a namespace decorated with @package that have an @field decorator on every property. If this option is set to true, this behavior will be disabled, and only messages that are explicitly decorated with @message or that are reachable from a service operation will be emitted.