From e4df6d2899b15128b2d0352c4cbf12c0ee3b1e21 Mon Sep 17 00:00:00 2001 From: Paradoxe Ngwasi Date: Mon, 11 Dec 2023 23:40:36 +0000 Subject: [PATCH] tiny changes --- apps/web/app/env.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/web/app/env.ts b/apps/web/app/env.ts index d9a236b41..f6a5d746c 100644 --- a/apps/web/app/env.ts +++ b/apps/web/app/env.ts @@ -14,6 +14,15 @@ type ReturnedType = { readonly value: T extends string ? string : InferValue; }; +/** + * This function loads only env variables which start with NEXT_PUBLIC_* + * + * Usefull to get the latest value of variable at runtime instead of buildtime + * + * @param name + * @param options + * @returns + */ export function getNextPublicEnv>(name: string, options?: O): ReturnedType { return { get value() {