From c8de4c66cd093cb85d6e2c6f283ca931fb4d4e45 Mon Sep 17 00:00:00 2001 From: Daniel Rivers Date: Fri, 23 Feb 2024 15:21:49 +0000 Subject: [PATCH] fix: move router type definitions --- src/routerClients/RouterClient.js | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/routerClients/RouterClient.js b/src/routerClients/RouterClient.js index 51f660f..513d70a 100644 --- a/src/routerClients/RouterClient.js +++ b/src/routerClients/RouterClient.js @@ -1,23 +1,24 @@ import {NextResponse} from 'next/server'; export default class RouterClient { + /** @type {import('../../types').KindeClient} */ + kindeClient = null; + /** @type {URL} */ + url; + /** @type {import('@kinde-oss/kinde-typescript-sdk').SessionManager} */ + sessionManager; + /** @type {import('next').NextApiResponse | *} */ + res; + /** @type {import('next').NextApiRequest | NextResponse | *} */ + req; + /** @type {URLSearchParams} */ + searchParams; + constructor() { if (this.constructor == RouterClient) { throw new Error("Abstract classes can't be instantiated."); } - /** @type {import('../../types').KindeClient} */ - this.kindeClient; - /** @type {URL} */ - this.url; - /** @type {import('@kinde-oss/kinde-typescript-sdk').SessionManager} */ - this.sessionManager; - /** @type {import('next').NextApiResponse | *} */ - this.res; - /** @type {import('next').NextApiRequest | NextResponse | *} */ - this.req; - /** @type {URLSearchParams} */ - this.searchParams; - } + } /** *