Skip to content

Connect, collaborate, and grow with a community of TypeScript developers

fix: type issue in feature flags, missing env var in turbo.json (#436)

Dylan Fontaineb044ec355952
diff --git a/apps/web/src/utils/feature-flags.ts b/apps/web/src/utils/feature-flags.ts
index c0ddf693..d695451d 100644
--- a/apps/web/src/utils/feature-flags.ts
+++ b/apps/web/src/utils/feature-flags.ts
@@ -1,4 +1,4 @@
-import { createClient } from '@vercel/edge-config';
+import { createClient, type EdgeConfigItems } from '@vercel/edge-config';
const edgeConfig = createClient(process.env.EDGE_CONFIG);
/**
@@ -16,7 +16,7 @@ export async function evaluateFlag(key: string): Promise<boolean> {
return rawValue == true;
}
-export async function getAllFlags(): Promise<any> {
+export async function getAllFlags(): Promise<EdgeConfigItems> {
const allFeatureFlag = await edgeConfig.getAll();
return allFeatureFlag;
}
diff --git a/turbo.json b/turbo.json
index d9667160..bc04e1ab 100644
--- a/turbo.json
+++ b/turbo.json
@@ -5,6 +5,7 @@
"outputs": ["dist/**", ".next/**", "!.next/cache/**"],
"env": [
"VERCEL_URL",
+ "VERCEL_ENV",
"NODE_ENV",
"DATABASE_URL",
"GITHUB_ID",