Repository navigation
Closed
Labels
confirmedThe maintainers of the repo would like to address thisThe maintainers of the repo would like to address thisenhancementNew feature or requestNew feature or request
Description
🔎 Search Terms
unions, discrimination, discriminate, discriminant, literals, strings, nested, properties
🧩 Context
- ArkType version: 2.1.20
- TypeScript version (5.1+): 5.7
- Other context you think may be relevant (JS flavor, OS, etc.): -
System:
OS: macOS 15.5
CPU: (10) arm64 Apple M1 Pro
Memory: 80.00 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.17.0 - ~/.nvm/versions/node/v22.17.0/bin/node
npm: 10.9.2 - ~/.nvm/versions/node/v22.17.0/bin/npm
pnpm: 9.13.2 - ~/Library/pnpm/pnpm
bun: 1.2.17 - ~/.bun/bin/bun
npmPackages:
typescript: catalog: => 5.7.3
🧑💻 Repro
The error output is inconsistent. When the form '"b" | "c"' is used it doesn't tell me the discriminator "tag" is absent.
Discussion on Discord: https://discordapp.com/channels/957797212103016458/957804102685982740/1406737917430206564
Metadata
Metadata
Assignees
Labels
confirmedThe maintainers of the repo would like to address thisThe maintainers of the repo would like to address thisenhancementNew feature or requestNew feature or request
Type
Projects
- StatusShow more project fieldsDone (merged or closed)
Activity
[-]Inconsistent error handling around unions[/-][+]Fully discriminate literal unions nested in properties[/+]feat(sets): discriminate by each value of a literal union
fix(schema): say a missing discriminant key "was missing"
ssalbdivad commentedon Nov 18, 2026
Fixed in 3.0.0-beta.0 (#1728). Try it with
npm i arktype@next.