Skip to content

PromptScript API


Type Alias: TargetName

TargetName = KnownTarget | CustomTarget

Defined in: core/src/types/config.ts:605

Supported output targets. Includes all known built-in targets plus custom targets registered via registerFormatter.

  • Use KnownTarget when you need exhaustiveness checks in switch/if-else.
  • Use TargetName when you need to accept both known and custom targets.
  • Use isKnownTarget() to narrow a TargetName to KnownTarget at runtime.
  • Use customTarget() to create a CustomTarget from a plain string.