From ca423b001a159791259f0c84a3569b2ccb4f2526 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 27 Mar 2026 12:30:08 +0200 Subject: [PATCH] chore(deps): update dependency typescript to v6 (#1594) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Vlad Frangu --- deno/rest/v10/mod.ts | 13 +++++++------ deno/rest/v6/mod.ts | 7 ++++--- deno/rest/v8/mod.ts | 7 ++++--- deno/rest/v9/mod.ts | 13 +++++++------ package.json | 2 +- rest/v10/index.ts | 13 +++++++------ rest/v6/index.ts | 7 ++++--- rest/v8/index.ts | 7 ++++--- rest/v9/index.ts | 13 +++++++------ yarn.lock | 26 +++----------------------- 10 files changed, 48 insertions(+), 60 deletions(-) diff --git a/deno/rest/v10/mod.ts b/deno/rest/v10/mod.ts index 462904a1..9d39c5a5 100644 --- a/deno/rest/v10/mod.ts +++ b/deno/rest/v10/mod.ts @@ -1114,8 +1114,8 @@ export const Routes = { }, }; -for (const [key, fn] of Object.entries(Routes)) { - Routes[key as keyof typeof Routes] = (...args: (boolean | number | string | undefined)[]) => { +for (const [key, fn] of Object.entries(Routes) as [keyof typeof Routes, (...args: any[]) => string][]) { + Routes[key] = ((...args: any[]) => { const escaped = args.map((arg) => { if (arg) { // Skip already "safe" urls @@ -1128,9 +1128,10 @@ for (const [key, fn] of Object.entries(Routes)) { return arg; }); + // eslint-disable-next-line no-useless-call return fn.call(null, ...escaped); - }; + }) as any; } // Freeze the object so it can't be changed @@ -1445,8 +1446,8 @@ export const CDNRoutes = { }, }; -for (const [key, fn] of Object.entries(CDNRoutes)) { - CDNRoutes[key as keyof typeof CDNRoutes] = (...args: (boolean | number | string | undefined)[]) => { +for (const [key, fn] of Object.entries(CDNRoutes) as [keyof typeof CDNRoutes, (...args: any[]) => string][]) { + CDNRoutes[key] = ((...args: any[]) => { const escaped = args.map((arg) => { if (arg) { // Skip already "safe" urls @@ -1461,7 +1462,7 @@ for (const [key, fn] of Object.entries(CDNRoutes)) { }); // eslint-disable-next-line no-useless-call return fn.call(null, ...escaped); - }; + }) as any; } // Freeze the object so it can't be changed diff --git a/deno/rest/v6/mod.ts b/deno/rest/v6/mod.ts index 91a44eda..7c7857af 100644 --- a/deno/rest/v6/mod.ts +++ b/deno/rest/v6/mod.ts @@ -522,8 +522,8 @@ export const Routes = { }, }; -for (const [key, fn] of Object.entries(Routes)) { - Routes[key] = (...args: (boolean | number | string | undefined)[]) => { +for (const [key, fn] of Object.entries(Routes) as [keyof typeof Routes, (...args: any[]) => string][]) { + Routes[key] = ((...args: any[]) => { const escaped = args.map((arg) => { if (arg) { // Skip already "safe" urls @@ -536,9 +536,10 @@ for (const [key, fn] of Object.entries(Routes)) { return arg; }); + // eslint-disable-next-line no-useless-call return fn.call(null, ...escaped); - }; + }) as any; } // Freeze the object so it can't be changed diff --git a/deno/rest/v8/mod.ts b/deno/rest/v8/mod.ts index b18b6847..a77d2478 100644 --- a/deno/rest/v8/mod.ts +++ b/deno/rest/v8/mod.ts @@ -778,8 +778,8 @@ export const Routes = { }, }; -for (const [key, fn] of Object.entries(Routes)) { - Routes[key] = (...args: (boolean | number | string | undefined)[]) => { +for (const [key, fn] of Object.entries(Routes) as [keyof typeof Routes, (...args: any[]) => string][]) { + Routes[key] = ((...args: any[]) => { const escaped = args.map((arg) => { if (arg) { // Skip already "safe" urls @@ -792,9 +792,10 @@ for (const [key, fn] of Object.entries(Routes)) { return arg; }); + // eslint-disable-next-line no-useless-call return fn.call(null, ...escaped); - }; + }) as any; } // Freeze the object so it can't be changed diff --git a/deno/rest/v9/mod.ts b/deno/rest/v9/mod.ts index 98ee7952..73f21556 100644 --- a/deno/rest/v9/mod.ts +++ b/deno/rest/v9/mod.ts @@ -1123,8 +1123,8 @@ export const Routes = { }, }; -for (const [key, fn] of Object.entries(Routes)) { - Routes[key as keyof typeof Routes] = (...args: (boolean | number | string | undefined)[]) => { +for (const [key, fn] of Object.entries(Routes) as [keyof typeof Routes, (...args: any[]) => string][]) { + Routes[key] = ((...args: any[]) => { const escaped = args.map((arg) => { if (arg) { // Skip already "safe" urls @@ -1137,9 +1137,10 @@ for (const [key, fn] of Object.entries(Routes)) { return arg; }); + // eslint-disable-next-line no-useless-call return fn.call(null, ...escaped); - }; + }) as any; } // Freeze the object so it can't be changed @@ -1454,8 +1455,8 @@ export const CDNRoutes = { }, }; -for (const [key, fn] of Object.entries(CDNRoutes)) { - CDNRoutes[key as keyof typeof CDNRoutes] = (...args: (boolean | number | string | undefined)[]) => { +for (const [key, fn] of Object.entries(CDNRoutes) as [keyof typeof CDNRoutes, (...args: any[]) => string][]) { + CDNRoutes[key] = ((...args: any[]) => { const escaped = args.map((arg) => { if (arg) { // Skip already "safe" urls @@ -1470,7 +1471,7 @@ for (const [key, fn] of Object.entries(CDNRoutes)) { }); // eslint-disable-next-line no-useless-call return fn.call(null, ...escaped); - }; + }) as any; } // Freeze the object so it can't be changed diff --git a/package.json b/package.json index 36ddda7a..d56d72e0 100644 --- a/package.json +++ b/package.json @@ -160,7 +160,7 @@ "ts-morph": "^27.0.0", "tsutils": "^3.21.0", "tsx": "^4.20.3", - "typescript": "^5.8.3", + "typescript": "^6.0.0", "typescript-eslint": "^8.33.0" }, "publishConfig": { diff --git a/rest/v10/index.ts b/rest/v10/index.ts index d76b1725..069efa82 100644 --- a/rest/v10/index.ts +++ b/rest/v10/index.ts @@ -1114,8 +1114,8 @@ export const Routes = { }, }; -for (const [key, fn] of Object.entries(Routes)) { - Routes[key as keyof typeof Routes] = (...args: (boolean | number | string | undefined)[]) => { +for (const [key, fn] of Object.entries(Routes) as [keyof typeof Routes, (...args: any[]) => string][]) { + Routes[key] = ((...args: any[]) => { const escaped = args.map((arg) => { if (arg) { // Skip already "safe" urls @@ -1128,9 +1128,10 @@ for (const [key, fn] of Object.entries(Routes)) { return arg; }); + // eslint-disable-next-line no-useless-call return fn.call(null, ...escaped); - }; + }) as any; } // Freeze the object so it can't be changed @@ -1445,8 +1446,8 @@ export const CDNRoutes = { }, }; -for (const [key, fn] of Object.entries(CDNRoutes)) { - CDNRoutes[key as keyof typeof CDNRoutes] = (...args: (boolean | number | string | undefined)[]) => { +for (const [key, fn] of Object.entries(CDNRoutes) as [keyof typeof CDNRoutes, (...args: any[]) => string][]) { + CDNRoutes[key] = ((...args: any[]) => { const escaped = args.map((arg) => { if (arg) { // Skip already "safe" urls @@ -1461,7 +1462,7 @@ for (const [key, fn] of Object.entries(CDNRoutes)) { }); // eslint-disable-next-line no-useless-call return fn.call(null, ...escaped); - }; + }) as any; } // Freeze the object so it can't be changed diff --git a/rest/v6/index.ts b/rest/v6/index.ts index 2f193cef..6b8d1641 100644 --- a/rest/v6/index.ts +++ b/rest/v6/index.ts @@ -522,8 +522,8 @@ export const Routes = { }, }; -for (const [key, fn] of Object.entries(Routes)) { - Routes[key] = (...args: (boolean | number | string | undefined)[]) => { +for (const [key, fn] of Object.entries(Routes) as [keyof typeof Routes, (...args: any[]) => string][]) { + Routes[key] = ((...args: any[]) => { const escaped = args.map((arg) => { if (arg) { // Skip already "safe" urls @@ -536,9 +536,10 @@ for (const [key, fn] of Object.entries(Routes)) { return arg; }); + // eslint-disable-next-line no-useless-call return fn.call(null, ...escaped); - }; + }) as any; } // Freeze the object so it can't be changed diff --git a/rest/v8/index.ts b/rest/v8/index.ts index 529d6608..66e92d02 100644 --- a/rest/v8/index.ts +++ b/rest/v8/index.ts @@ -778,8 +778,8 @@ export const Routes = { }, }; -for (const [key, fn] of Object.entries(Routes)) { - Routes[key] = (...args: (boolean | number | string | undefined)[]) => { +for (const [key, fn] of Object.entries(Routes) as [keyof typeof Routes, (...args: any[]) => string][]) { + Routes[key] = ((...args: any[]) => { const escaped = args.map((arg) => { if (arg) { // Skip already "safe" urls @@ -792,9 +792,10 @@ for (const [key, fn] of Object.entries(Routes)) { return arg; }); + // eslint-disable-next-line no-useless-call return fn.call(null, ...escaped); - }; + }) as any; } // Freeze the object so it can't be changed diff --git a/rest/v9/index.ts b/rest/v9/index.ts index 87ce7795..137fec40 100644 --- a/rest/v9/index.ts +++ b/rest/v9/index.ts @@ -1123,8 +1123,8 @@ export const Routes = { }, }; -for (const [key, fn] of Object.entries(Routes)) { - Routes[key as keyof typeof Routes] = (...args: (boolean | number | string | undefined)[]) => { +for (const [key, fn] of Object.entries(Routes) as [keyof typeof Routes, (...args: any[]) => string][]) { + Routes[key] = ((...args: any[]) => { const escaped = args.map((arg) => { if (arg) { // Skip already "safe" urls @@ -1137,9 +1137,10 @@ for (const [key, fn] of Object.entries(Routes)) { return arg; }); + // eslint-disable-next-line no-useless-call return fn.call(null, ...escaped); - }; + }) as any; } // Freeze the object so it can't be changed @@ -1454,8 +1455,8 @@ export const CDNRoutes = { }, }; -for (const [key, fn] of Object.entries(CDNRoutes)) { - CDNRoutes[key as keyof typeof CDNRoutes] = (...args: (boolean | number | string | undefined)[]) => { +for (const [key, fn] of Object.entries(CDNRoutes) as [keyof typeof CDNRoutes, (...args: any[]) => string][]) { + CDNRoutes[key] = ((...args: any[]) => { const escaped = args.map((arg) => { if (arg) { // Skip already "safe" urls @@ -1470,7 +1471,7 @@ for (const [key, fn] of Object.entries(CDNRoutes)) { }); // eslint-disable-next-line no-useless-call return fn.call(null, ...escaped); - }; + }) as any; } // Freeze the object so it can't be changed diff --git a/yarn.lock b/yarn.lock index e17eda22..0222cfb7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4383,7 +4383,7 @@ __metadata: ts-morph: "npm:^27.0.0" tsutils: "npm:^3.21.0" tsx: "npm:^4.20.3" - typescript: "npm:^5.8.3" + typescript: "npm:^6.0.0" typescript-eslint: "npm:^8.33.0" languageName: unknown linkType: soft @@ -9640,7 +9640,7 @@ __metadata: languageName: node linkType: hard -"typescript@npm:>=5": +"typescript@npm:>=5, typescript@npm:^6.0.0": version: 6.0.2 resolution: "typescript@npm:6.0.2" bin: @@ -9650,17 +9650,7 @@ __metadata: languageName: node linkType: hard -"typescript@npm:^5.8.3": - version: 5.9.3 - resolution: "typescript@npm:5.9.3" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10c0/6bd7552ce39f97e711db5aa048f6f9995b53f1c52f7d8667c1abdc1700c68a76a308f579cd309ce6b53646deb4e9a1be7c813a93baaf0a28ccd536a30270e1c5 - languageName: node - linkType: hard - -"typescript@patch:typescript@npm%3A>=5#optional!builtin": +"typescript@patch:typescript@npm%3A>=5#optional!builtin, typescript@patch:typescript@npm%3A^6.0.0#optional!builtin": version: 6.0.2 resolution: "typescript@patch:typescript@npm%3A6.0.2#optional!builtin::version=6.0.2&hash=5786d5" bin: @@ -9670,16 +9660,6 @@ __metadata: languageName: node linkType: hard -"typescript@patch:typescript@npm%3A^5.8.3#optional!builtin": - version: 5.9.3 - resolution: "typescript@patch:typescript@npm%3A5.9.3#optional!builtin::version=5.9.3&hash=5786d5" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10c0/ad09fdf7a756814dce65bc60c1657b40d44451346858eea230e10f2e95a289d9183b6e32e5c11e95acc0ccc214b4f36289dcad4bf1886b0adb84d711d336a430 - languageName: node - linkType: hard - "uglify-js@npm:^3.1.4": version: 3.19.3 resolution: "uglify-js@npm:3.19.3"