File tree Expand file tree Collapse file tree 4 files changed +20
-24
lines changed
Expand file tree Collapse file tree 4 files changed +20
-24
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ---
Original file line number Diff line number Diff line change @@ -26,17 +26,6 @@ const LazyCreateKeylessApplication = dynamic(() =>
2626 import ( './keyless-creator-reader.js' ) . then ( m => m . KeylessCreatorOrReader ) ,
2727) ;
2828
29- declare global {
30- export interface Window {
31- __clerk_nav_await : Array < ( value : void ) => void > ;
32- __clerk_nav : ( to : string ) => Promise < void > ;
33- __clerk_internal_invalidateCachePromise : ( ) => void | undefined ;
34- next ?: {
35- version : string ;
36- } ;
37- }
38- }
39-
4029const NextClientClerkProvider = ( props : NextClerkProviderProps ) => {
4130 if ( isNextWithUnstableServerActions ) {
4231 const deprecationWarning = `Clerk:\nYour current Next.js version (${ nextPackage . version } ) will be deprecated in the next major release of "@clerk/nextjs". Please upgrade to next@14.1.0 or later.` ;
Original file line number Diff line number Diff line change @@ -2,21 +2,8 @@ import type { AppRouterInstance } from 'next/dist/shared/lib/app-router-context.
22import { usePathname } from 'next/navigation' ;
33import { useCallback , useEffect , useTransition } from 'react' ;
44
5- import type { NextClerkProviderProps } from '../../types' ;
65import { removeBasePath } from '../../utils/removeBasePath' ;
76
8- declare global {
9- interface Window {
10- __clerk_internal_navigations : Record <
11- string ,
12- {
13- fun : NonNullable < NextClerkProviderProps [ 'routerPush' ] | NextClerkProviderProps [ 'routerReplace' ] > ;
14- promisesBuffer : Array < ( ) => void > | undefined ;
15- }
16- > ;
17- }
18- }
19-
207const getClerkNavigationObject = ( name : string ) => {
218 window . __clerk_internal_navigations ??= { } ;
229 // @ts -ignore
Original file line number Diff line number Diff line change @@ -14,9 +14,27 @@ declare namespace NodeJS {
1414 }
1515}
1616
17+ // eslint-disable-next-line @typescript-eslint/consistent-type-imports
18+ type NextClerkProviderProps = import ( './types' ) . NextClerkProviderProps ;
19+
1720interface Window {
21+ __clerk_internal_navigations : Record <
22+ string ,
23+ {
24+ fun : NonNullable < NextClerkProviderProps [ 'routerPush' ] | NextClerkProviderProps [ 'routerReplace' ] > ;
25+ promisesBuffer : Array < ( ) => void > | undefined ;
26+ }
27+ > ;
28+ __clerk_internal_invalidateCachePromise : ( ) => void | undefined ;
29+ __clerk_nav_await : Array < ( value : void ) => void > ;
30+ __clerk_nav : ( to : string ) => Promise < void > ;
31+
1832 __unstable__onBeforeSetActive : ( ) => void | Promise < void > ;
1933 __unstable__onAfterSetActive : ( ) => void | Promise < void > ;
34+
35+ next ?: {
36+ version : string ;
37+ } ;
2038}
2139
2240declare const PACKAGE_NAME : string ;
You can’t perform that action at this time.
0 commit comments