Travis
Travis
Aarktype
Created by natedunn on 5/17/2025 in #questions
Auto throw if invalid
import { type } from "arktype"

const Thing = type({
name: "string",
"versions?": "(number | string)[]"
})

const out = Thing.assert({
name: "TypeScript",
versions: ["5.8.2", 6, 7n]
})
import { type } from "arktype"

const Thing = type({
name: "string",
"versions?": "(number | string)[]"
})

const out = Thing.assert({
name: "TypeScript",
versions: ["5.8.2", 6, 7n]
})
10 replies
Aarktype
Created by natedunn on 5/17/2025 in #questions
Auto throw if invalid
.assert
10 replies