Setup
Installation
pnpm install arktype
npm install arktype
yarn install arktype
bun install arktype
You’ll also need…
- TypeScript version
>=5.1
. - A
tsconfig.json
with…strict
orstrictNullChecks
(required)skipLibCheck
(strongly recommended, see FAQ)exactOptionalPropertyTypes
(recommended)
VSCode
Settings
To take advantage of all of ArkType’s autocomplete capabilities, you’ll need to add the following to your workspace settings at .vscode/settings.json
:
{
// other settings...
// allow autocomplete for ArkType expressions like "string | num"
"editor.quickSuggestions": {
"strings": "on"
}
}
Extension (optional)
ArkDark provides the embedded syntax highlighting you’ll see throughout the docs.
Even without it, your definitions will feel like a natural extension of the language. With it, you’ll forget the boundary altogether.
Other editors
If you’re using a different editor, we’d love help adding support. In the meantime, don’t worry- ArkType still offers best-in-class DX anywhere TypeScript is supported.