From c467cf41025018a08b18704541b82d7b695b9628 Mon Sep 17 00:00:00 2001 From: Andrew Bobkov Date: Sun, 21 Apr 2024 15:53:51 +0000 Subject: [PATCH] chore: infer clerkAuth type instead of importing it directly --- packages/clerk-auth/src/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/clerk-auth/src/index.ts b/packages/clerk-auth/src/index.ts index b89352abc..c5b13df51 100644 --- a/packages/clerk-auth/src/index.ts +++ b/packages/clerk-auth/src/index.ts @@ -1,13 +1,14 @@ import { type ClerkClient, type ClerkOptions, createClerkClient } from '@clerk/backend' -import type { RequestState } from '@clerk/backend/dist/tokens/authStatus' import { PROD_API_URL } from '@clerk/shared' import type { Context, MiddlewareHandler } from 'hono' import { env } from 'hono/adapter' +type ClerkAuth = ReturnType>['toAuth']> + declare module 'hono' { interface ContextVariableMap { clerk: ClerkClient - clerkAuth: ReturnType + clerkAuth: ClerkAuth } }