diff --git a/src/ActiveLogin.Authentication.BankId.AspNetCore/ActiveLogin.Authentication.BankId.AspNetCore.csproj b/src/ActiveLogin.Authentication.BankId.AspNetCore/ActiveLogin.Authentication.BankId.AspNetCore.csproj index 0666bb01..63ebe22d 100644 --- a/src/ActiveLogin.Authentication.BankId.AspNetCore/ActiveLogin.Authentication.BankId.AspNetCore.csproj +++ b/src/ActiveLogin.Authentication.BankId.AspNetCore/ActiveLogin.Authentication.BankId.AspNetCore.csproj @@ -14,7 +14,7 @@ - + @@ -53,7 +53,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -74,6 +74,6 @@ false es2018 dom,es2018 - None + esnext diff --git a/src/ActiveLogin.Authentication.BankId.AspNetCore/Client/activelogin-main.ts b/src/ActiveLogin.Authentication.BankId.AspNetCore/Client/activelogin-main.ts index 6ed5f0e2..d82743f4 100644 --- a/src/ActiveLogin.Authentication.BankId.AspNetCore/Client/activelogin-main.ts +++ b/src/ActiveLogin.Authentication.BankId.AspNetCore/Client/activelogin-main.ts @@ -41,9 +41,9 @@ function activeloginInit(configuration: IBankIdUiScriptConfiguration, initState: // QR - var qrLastRefreshTimestamp: Date = null; + var qrLastRefreshTimestamp: Date | null = null; var qrIsRefreshing = false; - var qrRefreshTimeoutId: number = null; + var qrRefreshTimeoutId: number | undefined = undefined; // OrderRef // @@ -134,10 +134,10 @@ function activeloginInit(configuration: IBankIdUiScriptConfiguration, initState: link.click(); } - function enableCancelButton(requestVerificationToken: string, cancelUrl: string, orderRef: string = null) { + function enableCancelButton(requestVerificationToken: string, cancelUrl: string, orderRef: string | null = null) { var onCancelButtonClick = (event: Event) => { cancel(requestVerificationToken, cancelUrl, orderRef); - event.target.removeEventListener("click", onCancelButtonClick); + (event.target as EventTarget).removeEventListener("click", onCancelButtonClick); }; cancelButtonElement.addEventListener("click", onCancelButtonClick); } @@ -168,7 +168,7 @@ function activeloginInit(configuration: IBankIdUiScriptConfiguration, initState: var startBankIdAppButtonOnClick = (event: Event) => { launchBankIdApp(data.redirectUri); hide(startBankIdAppButtonElement); - event.target.removeEventListener("click", startBankIdAppButtonOnClick); + (event.target as EventTarget).removeEventListener("click", startBankIdAppButtonOnClick); }; startBankIdAppButtonElement.addEventListener("click", startBankIdAppButtonOnClick); @@ -250,7 +250,7 @@ function activeloginInit(configuration: IBankIdUiScriptConfiguration, initState: } const currentTime = new Date(); - const timeSinceLastRefresh = currentTime.getTime() - qrLastRefreshTimestamp.getTime(); + const timeSinceLastRefresh = currentTime.getTime() - qrLastRefreshTimestamp!.getTime(); if (timeSinceLastRefresh < configuration.qrCodeRefreshIntervalMs) { qrRefreshTimeoutId = setTimeout(() => { refreshQrCode(requestVerificationToken, qrStartState); @@ -294,7 +294,7 @@ function activeloginInit(configuration: IBankIdUiScriptConfiguration, initState: show(qrCodeElement); } - function cancel(requestVerificationToken: string, cancelReturnUrl: string, orderRef: string = null) { + function cancel(requestVerificationToken: string, cancelReturnUrl: string, orderRef: string | null = null) { flowIsCancelledByUser = true; if (!orderRef) { @@ -388,9 +388,9 @@ function activeloginInit(configuration: IBankIdUiScriptConfiguration, initState: show(statusWrapperElement); } - function setVisibility(element: HTMLElement, visible: boolean, display: string = null) { + function setVisibility(element: HTMLElement, visible: boolean, display: string | null = null) { if (visible) { - show(element, display); + show(element, display ?? undefined); } else { hide(element); } diff --git a/src/ActiveLogin.Authentication.BankId.Core/ActiveLogin.Authentication.BankId.Core.csproj b/src/ActiveLogin.Authentication.BankId.Core/ActiveLogin.Authentication.BankId.Core.csproj index 226b6242..827ad362 100644 --- a/src/ActiveLogin.Authentication.BankId.Core/ActiveLogin.Authentication.BankId.Core.csproj +++ b/src/ActiveLogin.Authentication.BankId.Core/ActiveLogin.Authentication.BankId.Core.csproj @@ -21,7 +21,7 @@ - + diff --git a/src/ActiveLogin.Authentication.BankId.QRCoder/ActiveLogin.Authentication.BankId.QRCoder.csproj b/src/ActiveLogin.Authentication.BankId.QRCoder/ActiveLogin.Authentication.BankId.QRCoder.csproj index 4a463b7d..e77103ed 100644 --- a/src/ActiveLogin.Authentication.BankId.QRCoder/ActiveLogin.Authentication.BankId.QRCoder.csproj +++ b/src/ActiveLogin.Authentication.BankId.QRCoder/ActiveLogin.Authentication.BankId.QRCoder.csproj @@ -12,7 +12,7 @@ - + diff --git a/test/ActiveLogin.Authentication.BankId.Api.Test/ActiveLogin.Authentication.BankId.Api.Test.csproj b/test/ActiveLogin.Authentication.BankId.Api.Test/ActiveLogin.Authentication.BankId.Api.Test.csproj index d6874493..f5e4b566 100644 --- a/test/ActiveLogin.Authentication.BankId.Api.Test/ActiveLogin.Authentication.BankId.Api.Test.csproj +++ b/test/ActiveLogin.Authentication.BankId.Api.Test/ActiveLogin.Authentication.BankId.Api.Test.csproj @@ -5,10 +5,11 @@ - - + + + - + all runtime; build; native; contentfiles; analyzers diff --git a/test/ActiveLogin.Authentication.BankId.AspNetCore.Test/ActiveLogin.Authentication.BankId.AspNetCore.Test.csproj b/test/ActiveLogin.Authentication.BankId.AspNetCore.Test/ActiveLogin.Authentication.BankId.AspNetCore.Test.csproj index 45fcdbd2..2ea9334f 100644 --- a/test/ActiveLogin.Authentication.BankId.AspNetCore.Test/ActiveLogin.Authentication.BankId.AspNetCore.Test.csproj +++ b/test/ActiveLogin.Authentication.BankId.AspNetCore.Test/ActiveLogin.Authentication.BankId.AspNetCore.Test.csproj @@ -1,19 +1,20 @@ - + - + - - + + + - + all runtime; build; native; contentfiles; analyzers diff --git a/test/ActiveLogin.Authentication.BankId.AzureKeyVault.Test/ActiveLogin.Authentication.BankId.AzureKeyVault.Test.csproj b/test/ActiveLogin.Authentication.BankId.AzureKeyVault.Test/ActiveLogin.Authentication.BankId.AzureKeyVault.Test.csproj index e811754e..fe954c97 100644 --- a/test/ActiveLogin.Authentication.BankId.AzureKeyVault.Test/ActiveLogin.Authentication.BankId.AzureKeyVault.Test.csproj +++ b/test/ActiveLogin.Authentication.BankId.AzureKeyVault.Test/ActiveLogin.Authentication.BankId.AzureKeyVault.Test.csproj @@ -4,9 +4,9 @@ - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/test/ActiveLogin.Authentication.BankId.Core.Test/ActiveLogin.Authentication.BankId.Core.Test.csproj b/test/ActiveLogin.Authentication.BankId.Core.Test/ActiveLogin.Authentication.BankId.Core.Test.csproj index 4cc061cd..bf8ad775 100644 --- a/test/ActiveLogin.Authentication.BankId.Core.Test/ActiveLogin.Authentication.BankId.Core.Test.csproj +++ b/test/ActiveLogin.Authentication.BankId.Core.Test/ActiveLogin.Authentication.BankId.Core.Test.csproj @@ -5,10 +5,10 @@ - - + + - + all runtime; build; native; contentfiles; analyzers diff --git a/test/ActiveLogin.Authentication.BankId.UAParser.Test/ActiveLogin.Authentication.BankId.UAParser.Test.csproj b/test/ActiveLogin.Authentication.BankId.UAParser.Test/ActiveLogin.Authentication.BankId.UAParser.Test.csproj index 1ea4e012..3e8f6680 100644 --- a/test/ActiveLogin.Authentication.BankId.UAParser.Test/ActiveLogin.Authentication.BankId.UAParser.Test.csproj +++ b/test/ActiveLogin.Authentication.BankId.UAParser.Test/ActiveLogin.Authentication.BankId.UAParser.Test.csproj @@ -5,14 +5,14 @@ - - + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive