From edac64790eb8df8c08aa4448f16a5ead50873d8c Mon Sep 17 00:00:00 2001 From: Peter Phanouvong Date: Mon, 13 Nov 2023 14:39:08 +1100 Subject: [PATCH] type: imports --- src/handlers/auth.js | 3 +-- src/routerClients/AppRouterClient.js | 3 +-- src/routerClients/RouterClient.js | 5 +---- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/handlers/auth.js b/src/handlers/auth.js index 72844d0..bb99bfe 100644 --- a/src/handlers/auth.js +++ b/src/handlers/auth.js @@ -7,7 +7,6 @@ import {setup} from './setup'; import {register} from './register'; import AppRouterClient from '../routerClients/AppRouterClient'; import PagesRouterClient from '../routerClients/PagesRouterClient'; -import {NextRequest} from 'next/server'; import RouterClient from '../routerClients/RouterClient'; /** @@ -56,7 +55,7 @@ export default (request, endpoint) => { /** * - * @param {NextRequest} req + * @param {import("next/server").NextRequest} req * @param {{params: {kindeAuth: string}}} res * @returns */ diff --git a/src/routerClients/AppRouterClient.js b/src/routerClients/AppRouterClient.js index db6f8cb..d173f94 100644 --- a/src/routerClients/AppRouterClient.js +++ b/src/routerClients/AppRouterClient.js @@ -1,7 +1,6 @@ import {createKindeServerClient} from '@kinde-oss/kinde-typescript-sdk'; import {cookies} from 'next/headers'; import {redirect} from 'next/navigation'; -import {NextRequest} from 'next/server'; import {config} from '../config/index'; import {appRouterSessionManager} from '../session/sessionManager'; import RouterClient from './RouterClient'; @@ -10,7 +9,7 @@ import RouterClient from './RouterClient'; export default class AppRouterClient extends RouterClient { /** * - * @param {NextRequest} req + * @param {import("next/server").NextRequest} req * @param {*} res */ constructor(req, res) { diff --git a/src/routerClients/RouterClient.js b/src/routerClients/RouterClient.js index 5a7a9bf..993557e 100644 --- a/src/routerClients/RouterClient.js +++ b/src/routerClients/RouterClient.js @@ -1,6 +1,3 @@ -import {GrantType} from '@kinde-oss/kinde-typescript-sdk'; -import {NextResponse} from 'next/server'; - export default class RouterClient { constructor() { if (this.constructor == RouterClient) { @@ -14,7 +11,7 @@ export default class RouterClient { this.sessionManager; /** @type {import('next').NextApiResponse | *} */ this.res; - /** @type {import('next').NextApiRequest | NextResponse | *} */ + /** @type {import('next').NextApiRequest | import('next/server').NextResponse | *} */ this.req; /** @type {URLSearchParams} */ this.searchParams;