#How to configure the remix.env.d.ts file?
1 messages · Page 1 of 1 (latest)
I usually Zod to parse my env variables, and extract the type from the schema https://sergiodxa.com/articles/using-zod-to-safely-read-env-variables
1 messages · Page 1 of 1 (latest)
I just wondering how you guys define the types of your .env variables in Remix.
I've tryied this way, but idk if it's the right way to do it or not:
/// <reference types="@remix-run/node" />
export {};
declare global {
namespace NodeJS {
interface ProcessEnv {
API_URL: string;
}
}
}```
I usually Zod to parse my env variables, and extract the type from the schema https://sergiodxa.com/articles/using-zod-to-safely-read-env-variables