Defjs
Core

struct.string

Struct that accepts string values.

@defjs/core · Function

Signature

function string(): StringStruct;
  • Accepts string values only; anything else fails with invalid_type.

  • As a body root, or as an inbound output / error struct, the bytes stay text instead of being parsed as JSON.

Edit this page on GitHub
Released under the MIT License. · Copyright © 2026 MunMunMiao