Skip to content

meta key #1554

Closed
Closed

Description

@ssalbdivad

would allow specifying top-level metadata for an object like this:

const t = type({
  "@": {
    description: "my description",
  },
  name: "string",
});

Activity

  1. gabrielgrant commented on Dec 16, 2025

    @gabrielgrant
    Contributor

    Would it make sense to use a symbol as the prop rather than introduce a reserved string? Or are you trying to maintain straightforward JSON serializability? (perhaps prefered for #818 ?)

  2. ssalbdivad commented on Dec 16, 2025

    @ssalbdivad
    MemberAuthor

    Yeah the string syntax already mirrors some other features like key-optionality, index signatures, "+": "reject" for specifying how undeclared keys are handled etc. so there's precedent for escaping that.

    We actually don't use any symbols at all in ArkType, instead favoring string literal for internal keys like arkInferred to avoid some known issues with symbols resoloving incorrectly in node_modules and leading to inference problems or exacerbating duplicate install issues.

  3. ssalbdivad commented on Nov 18, 2026

    @ssalbdivad
    MemberAuthor

    Fixed in 3.0.0-beta.0 (#1728). Try it with npm i arktype@next.

  4. moved this from To do to Done (merged or closed) in arktypeioon Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    • Status
      Done (merged or closed)

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions