react-env-secrets
Version:
A zero-config React hook for environment variables - drop-in replacement for process.env
14 lines • 470 B
TypeScript
interface EnvVars {
[key: string]: string | undefined;
}
interface UseEnvOptions {
prefix?: string;
required?: string[];
fallbacks?: Record<string, string>;
}
export declare function useEnv(options?: UseEnvOptions): EnvVars;
export declare function useEnvVar(key: string, fallback?: string): string | undefined;
export declare function clearEnvCache(): void;
export declare function listEnvVars(): string[];
export {};
//# sourceMappingURL=index.d.ts.map