refactor: Typescript fixes and updates for bumping ts version to 5.8.2 (#19690)

* Typescript fixes and updates for bumping ts version to 5.8.2

* Different TS versions do see an error, so @ts-ignore'ing

* Attempt this fix for ignoring createDecipher/createCipher fns

* Remove @ts-expect-error
This commit is contained in:
Alex van Andel authored and GitHub committed 2025-03-05 09:17:08 -03:00
1 parent 1545a8ec82
commit 6f62c6ad5d
17 files changed
+28 -23

No files matched your search

+1 -1
View File
@@ -190,7 +190,7 @@ export const useBookingSuccessRedirect = () => {
...query,
...bookingExtraParams,
},
searchParams: searchParams ?? undefined,
searchParams: new URLSearchParams(searchParams.toString()),
});
newSearchParams.forEach((value, key) => {
-1
View File
@@ -15,7 +15,6 @@ const IV_LENGTH = 16; // AES blocksize
export const symmetricEncrypt = function (text: string, key: string) {
const _key = Buffer.from(key, "latin1");
const iv = crypto.randomBytes(IV_LENGTH);
const cipher = crypto.createCipheriv(ALGORITHM, _key, iv);
let ciphered = cipher.update(text, INPUT_ENCODING, OUTPUT_ENCODING);
ciphered += cipher.final(OUTPUT_ENCODING);
+4
View File
@@ -10,7 +10,11 @@ export const slugify = (str: string, forDisplayingInput?: boolean) => {
.toLowerCase() // Convert to lowercase
.trim() // Remove whitespace from both sides
.normalize("NFD") // Normalize to decomposed form for handling accents
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
.replace(/\p{Diacritic}/gu, "") // Remove any diacritics (accents) from characters
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
.replace(/[^.\p{L}\p{N}\p{Zs}\p{Emoji}]+/gu, "-") // Replace any non-alphanumeric characters (including Unicode and except "." period) with a dash
.replace(/[\s_#]+/g, "-") // Replace whitespace, # and underscores with a single dash
.replace(/^-+/, "") // Remove dashes from start