FaasJS
Home
  • Guide
  • Documents
  • Templates
  • Changelog
  • Ecosystem

    • Docker Images
  • Github
  • Contributing
  • Sponsor
  • Security
Home
  • Guide
  • Documents
  • Templates
  • Changelog
  • Ecosystem

    • Docker Images
  • Github
  • Contributing
  • Sponsor
  • Security

Documents / @faasjs/node-utils / SchemaOutput

Type Alias: SchemaOutput<TSchema, TFallback>

SchemaOutput<TSchema, TFallback> = TSchema extends ZodType ? ZodOutput<NonNullable<TSchema>> : TFallback

Parsed value type for an optional Zod schema.

When a schema is present, the type is the schema's output type. When the schema is omitted, the caller-provided fallback type is used instead because the raw value is not parsed.

Type Parameters

TSchema

TSchema extends ZodType | undefined = undefined

TFallback

TFallback = Record<string, never>