arktypea
arktype12mo ago
Tom

Can arktype drop data not covered by schema?

I want to regurgitate my input according to the schema model, e.g:
const user = type({
    name: "string",
})

const out = user({name: "bob", age: 51})

I'd want to make out contain only {name: "bob"}. Is there a way to do this with arktype?
Was this page helpful?