Hi, not sure if this is an ArkType or ArkEnv specific question but I'm using ArkEnv for strongly typed env vars. Everything in my config is typed except for my database url, which is currently typed as 'any'.
If I remove the type() wrapper, then I get the following lint error:
Type '"string.url"' is not assignable to type '"Reference to submodule 'string.url' must specify an alias"'
Type '"string.url"' is not assignable to type '"Reference to submodule 'string.url' must specify an alias"'
Here is the config.ts from my Bun project:
import arkenv, { type } from "arkenv";export const config = arkenv({ SERVER_HOST: "string.host", SERVER_PORT: "number.port", NODE_ENV: "'development' | 'test' | 'production'", TURSO_DATABASE_URL: type("string.url"), // typed as 'any' TURSO_AUTH_TOKEN: "string",});
import arkenv, { type } from "arkenv";export const config = arkenv({ SERVER_HOST: "string.host", SERVER_PORT: "number.port", NODE_ENV: "'development' | 'test' | 'production'", TURSO_DATABASE_URL: type("string.url"), // typed as 'any' TURSO_AUTH_TOKEN: "string",});
Is there a way to type my URL as just a web standard URL? Or maybe type it as a string with a base url of 'libsql://'?