From 9bd8645e235bb12cfa0e1085e3db381652e06e8b Mon Sep 17 00:00:00 2001 From: Jacek Radko Date: Mon, 4 Nov 2024 21:25:27 -0600 Subject: [PATCH] fix(nextjs): Ambient global.d.ts (#4485) --- .changeset/plenty-snakes-turn.md | 2 ++ packages/nextjs/src/global.d.ts | 41 ++++++++++++++------------------ 2 files changed, 20 insertions(+), 23 deletions(-) create mode 100644 .changeset/plenty-snakes-turn.md diff --git a/.changeset/plenty-snakes-turn.md b/.changeset/plenty-snakes-turn.md new file mode 100644 index 0000000000..a845151cc8 --- /dev/null +++ b/.changeset/plenty-snakes-turn.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/packages/nextjs/src/global.d.ts b/packages/nextjs/src/global.d.ts index af96b97cc8..ae14ac1e11 100644 --- a/packages/nextjs/src/global.d.ts +++ b/packages/nextjs/src/global.d.ts @@ -1,28 +1,23 @@ -declare global { - interface Window { - __unstable__onBeforeSetActive: () => void | Promise; - __unstable__onAfterSetActive: () => void | Promise; +declare namespace NodeJS { + interface ProcessEnv { + CLERK_SECRET_KEY: string | undefined; + NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: string | undefined; + NEXT_PUBLIC_CLERK_PROXY_URL: string | undefined; + NEXT_PUBLIC_CLERK_SIGN_IN_URL: string | undefined; + NEXT_PUBLIC_CLERK_SIGN_UP_URL: string | undefined; + NEXT_PUBLIC_CLERK_SIGN_IN_FORCE_REDIRECT_URL: string | undefined; + NEXT_PUBLIC_CLERK_SIGN_UP_FORCE_REDIRECT_URL: string | undefined; + NEXT_PUBLIC_CLERK_SIGN_IN_FALLBACK_REDIRECT_URL: string | undefined; + NEXT_PUBLIC_CLERK_SIGN_UP_FALLBACK_REDIRECT_URL: string | undefined; + NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL: string | undefined; + NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL: string | undefined; } } -declare global { - const PACKAGE_NAME: string; - const PACKAGE_VERSION: string; - namespace NodeJS { - interface ProcessEnv { - CLERK_SECRET_KEY: string | undefined; - NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY: string | undefined; - NEXT_PUBLIC_CLERK_PROXY_URL: string | undefined; - NEXT_PUBLIC_CLERK_SIGN_IN_URL: string | undefined; - NEXT_PUBLIC_CLERK_SIGN_UP_URL: string | undefined; - NEXT_PUBLIC_CLERK_SIGN_IN_FORCE_REDIRECT_URL: string | undefined; - NEXT_PUBLIC_CLERK_SIGN_UP_FORCE_REDIRECT_URL: string | undefined; - NEXT_PUBLIC_CLERK_SIGN_IN_FALLBACK_REDIRECT_URL: string | undefined; - NEXT_PUBLIC_CLERK_SIGN_UP_FALLBACK_REDIRECT_URL: string | undefined; - NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL: string | undefined; - NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL: string | undefined; - } - } +interface Window { + __unstable__onBeforeSetActive: () => void | Promise; + __unstable__onAfterSetActive: () => void | Promise; } -export {}; +declare const PACKAGE_NAME: string; +declare const PACKAGE_VERSION: string;