papy0977
Aarktype
•Created by papy0977 on 1/20/2025 in #questions
Hi,
here the snippet i have now it seems that default is expecting for a a function as argument
import {type} from "arktype"
const base = type(
{
env:"string='base'",
database: {
connectionTimeoutMillis: "number.integer=3000",
app_db_client: "('pg-node'|'prisma'|'typeorm'|'knex'|'drizzle')='knex'",
migrate: type("string[]").default(() => ["no migration"]),
}
}
)
type Base = typeof base.infer
const def = base({})
console.log(def.env)
and i have def.env is undefined error4 replies