node-dextrin - v0.4.0
    Preparing search index...

    Function annotations

    • What the {:doc ... %{...}} around the schema or named type name says about it (DXNS.md §1b): its annotations by name, {} when it has none, undefined when there is no such name -- as the registry's fetch* answer a name it does not know. A schema answers for its latest version. As the reference's Dextrin.Schema.annotations/2.

      An enum's values is a Map from each value to its own annotations.

      Parameters

      Returns { [k: string]: unknown } | undefined

      const registry = Schema.compile(decode('%{Port: {:doc :integer %{description: "A TCP port"}}}'), new Registry());
      Schema.annotations(registry, 'Port'); // => {description: 'A TCP port'}