arktypea
arktype7mo ago
cowboyd

Defining Records with narrowed keys

I couldn't find a way in the docs on object types (https://arktype.io/docs/objects) to define a record with narrowed keys. For example keys with no special symbols in them:

BAD
{
  "$userName": "bob"
}

GOOD

{
  "userName": "bob",
}


Seems like there should be a way, but I haven't been able to locate it.
ArkType
TypeScript's 1:1 validator, optimized from editor to runtime
Was this page helpful?