From f8558e16e8054b7d17dcc9c35f4c5d8392b621e6 Mon Sep 17 00:00:00 2001 From: Matt Pocock Date: Fri, 17 Feb 2023 13:21:29 +0000 Subject: [PATCH] Removed 'as any' in jackson.ts (#7175) --- packages/features/ee/sso/lib/jackson.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/features/ee/sso/lib/jackson.ts b/packages/features/ee/sso/lib/jackson.ts index 12289b0654..519199ee44 100644 --- a/packages/features/ee/sso/lib/jackson.ts +++ b/packages/features/ee/sso/lib/jackson.ts @@ -1,9 +1,10 @@ -import jackson, { +import type { IConnectionAPIController, IOAuthController, JacksonOption, ISPSAMLConfig, } from "@boxyhq/saml-jackson"; +import jackson from "@boxyhq/saml-jackson"; import { WEBAPP_URL } from "@calcom/lib/constants"; @@ -27,10 +28,16 @@ let connectionController: IConnectionAPIController; let oauthController: IOAuthController; let samlSPConfig: ISPSAMLConfig; -const g = global as any; +const g = global; + +declare global { + var connectionController: IConnectionAPIController | undefined; + var oauthController: IOAuthController | undefined; + var samlSPConfig: ISPSAMLConfig | undefined; +} export default async function init() { - if (!g.connectionController || !g.oauthController) { + if (!g.connectionController || !g.oauthController || !g.samlSPConfig) { const ret = await jackson(opts); connectionController = ret.connectionAPIController;