Skip to content

Commit c37d62c

Browse files
committed
refactor(nuxt): use ClerkKeylessContext type in plugin
1 parent ec0db85 commit c37d62c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

packages/nuxt/src/runtime/plugin.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,15 @@ import { clerkPlugin } from '@clerk/vue';
44
import { setErrorThrowerOptions } from '@clerk/vue/internal';
55
import { defineNuxtPlugin, navigateTo, useRuntimeConfig, useState } from 'nuxt/app';
66

7+
import type { ClerkKeylessContext } from './server/types';
8+
79
setErrorThrowerOptions({ packageName: PACKAGE_NAME });
810
setClerkJSLoadingErrorPackageName(PACKAGE_NAME);
911

1012
export default defineNuxtPlugin(nuxtApp => {
1113
// SSR-friendly shared state
1214
const initialState = useState<InitialState | undefined>('clerk-initial-state', () => undefined);
13-
const keylessContext = useState<{ claimUrl?: string; apiKeysUrl?: string } | undefined>(
14-
'clerk-keyless-context',
15-
() => undefined,
16-
);
15+
const keylessContext = useState<ClerkKeylessContext | undefined>('clerk-keyless-context', () => undefined);
1716

1817
if (import.meta.server) {
1918
// Save the initial state from server and pass it to the plugin

0 commit comments

Comments
 (0)