# @ark/schema

> Underlying schema language parsed from arktype syntax.

Latest version **0.56.2** (published 2026-07-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ark/schema
pnpm add @ark/schema
yarn add @ark/schema
bun add @ark/schema
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.56.2 |
| Published | 2026-07-07 |
| First published | 2024-07-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 428.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7863 |
| Author | David Blass |
| Maintainers | ssalbdivad |

## Links

- npm: https://www.npmjs.com/package/@ark/schema
- Repository: https://github.com/arktypeio/arktype
- Homepage: https://github.com/arktypeio/arktype#readme
- Issues: https://github.com/arktypeio/arktype/issues
- npm.io page: https://npm.io/package/@ark/schema

## Dependencies (1)

- [@ark/util](https://npm.io/package/@ark/util.md) 0.56.2

## Recent versions

- 0.56.2 (latest) — 2026-07-07
- 0.56.1 — 2026-07-01
- 0.56.0 — 2025-12-03
- 0.55.0 — 2025-11-17
- 0.54.0 — 2025-11-10
- 0.53.0 — 2025-10-28
- 0.52.0 — 2025-10-28
- 0.51.0 — 2025-10-19
- 0.50.0 — 2025-10-14
- 0.49.0 — 2025-09-04
- 0.47.0 — 2025-09-02
- 0.46.0 — 2025-04-16
- 0.45.10 — 2025-04-09
- 0.45.9 — 2025-04-07
- 0.45.8 — 2025-04-07
- … 64 more at https://npm.io/package/@ark/schema/versions

## README

# @ark/schema

Underlying schema language parsed from arktype syntax.

The parts of ArkType's type system that exist in TS (i.e. not runtime-only constraints like bounds, divisors, custom predicates, morphs etc.) are structured like this:

- Union: a set of intersections
- Intersection: a set of a basis and constraints
- Basis: this is the base type to which refinements like props are applied. It is one of three things, getting narrower as you move down the list:
  - Domain: `"string" | "number" | "bigint" | "object" | "symbol"` parallels built-in TS keywords for non-enumerable value sets
  - Proto: Must be an `instanceof` some class (implies domain `"object"`)
  - Unit: Must `===` some value (can be intersected with any other constraint and reduced to itself or a disjoint)
- Constraint: an individual condition that must be satisfied:
  - Required: must have a specified literal string or symbol key and a value that conforms to a specified union or intersection
  - Optional: Required conditions met or the specified key is not present
  - Index: all keys that satisfy an index type must have values satisfying the corresponding value type

In this system, `L` extends/subtypes/is assignable to `R` if and only if the intersection `L & R` is equal to `L`.

---
_Source: https://npm.io/package/@ark/schema · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
