This repository was archived by the owner on Oct 15, 2021. It is now read-only.
This repository was archived by the owner on Oct 15, 2021. It is now read-only.
Add template for TypeScript environment variables #24
Open
Description
I forsee others will run into a similar extension of environment variables. This would be good to add a types.d.ts
file to make this extension easier
Example
import { PrismaClient } from './lib/prisma';
import { Client as MinioClient } from 'minio';
declare global {
namespace NodeJS {
interface ProcessEnv {
NODE_ENV: 'development' | 'production';
PORT?: string;
DATABASE_URL: string;
ENVIRONMENT: 'prod' | 'edge' | 'uat';
MINIO_SECRET: string;
MINIO_ACCESS: string;
MINIO_ENDPOINT: string;
MINIO_SSL: string;
GOOGLE_ANALYTICS_ID: string;
NEXTAUTH_URL: string;
}
}
}
export {};