Skip to content

Commit ace02e2

Browse files
committed
chore: try to fix CI
1 parent e7f0caa commit ace02e2

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

deno/rest/v10/mod.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,8 +1054,8 @@ export const Routes = {
10541054
};
10551055

10561056
for (const [key, fn] of Object.entries(Routes)) {
1057-
Routes[key] = (...args: string[]) => {
1058-
const escaped = args.map((arg) => encodeURIComponent(arg));
1057+
Routes[key as keyof typeof Routes] = (...args: (boolean | number | string | undefined)[]) => {
1058+
const escaped = args.map((arg) => arg && encodeURIComponent(arg));
10591059
// eslint-disable-next-line no-useless-call
10601060
return fn.call(null, ...escaped);
10611061
};
@@ -1362,8 +1362,8 @@ export const CDNRoutes = {
13621362
};
13631363

13641364
for (const [key, fn] of Object.entries(CDNRoutes)) {
1365-
CDNRoutes[key] = (...args: string[]) => {
1366-
const escaped = args.map((arg) => encodeURIComponent(arg));
1365+
CDNRoutes[key as keyof typeof CDNRoutes] = (...args: (number | string | undefined)[]) => {
1366+
const escaped = args.map((arg) => arg && encodeURIComponent(arg));
13671367
// eslint-disable-next-line no-useless-call
13681368
return fn.call(null, ...escaped);
13691369
};

deno/rest/v9/mod.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,8 +1063,8 @@ export const Routes = {
10631063
};
10641064

10651065
for (const [key, fn] of Object.entries(Routes)) {
1066-
Routes[key] = (...args: string[]) => {
1067-
const escaped = args.map((arg) => encodeURIComponent(arg));
1066+
Routes[key as keyof typeof Routes] = (...args: (boolean | number | string | undefined)[]) => {
1067+
const escaped = args.map((arg) => arg && encodeURIComponent(arg));
10681068
// eslint-disable-next-line no-useless-call
10691069
return fn.call(null, ...escaped);
10701070
};
@@ -1371,8 +1371,8 @@ export const CDNRoutes = {
13711371
};
13721372

13731373
for (const [key, fn] of Object.entries(CDNRoutes)) {
1374-
CDNRoutes[key] = (...args: string[]) => {
1375-
const escaped = args.map((arg) => encodeURIComponent(arg));
1374+
CDNRoutes[key as keyof typeof CDNRoutes] = (...args: (number | string | undefined)[]) => {
1375+
const escaped = args.map((arg) => arg && encodeURIComponent(arg));
13761376
// eslint-disable-next-line no-useless-call
13771377
return fn.call(null, ...escaped);
13781378
};

rest/v10/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,8 +1054,8 @@ export const Routes = {
10541054
};
10551055

10561056
for (const [key, fn] of Object.entries(Routes)) {
1057-
Routes[key] = (...args: string[]) => {
1058-
const escaped = args.map((arg) => encodeURIComponent(arg));
1057+
Routes[key as keyof typeof Routes] = (...args: (boolean | number | string | undefined)[]) => {
1058+
const escaped = args.map((arg) => arg && encodeURIComponent(arg));
10591059
// eslint-disable-next-line no-useless-call
10601060
return fn.call(null, ...escaped);
10611061
};
@@ -1362,8 +1362,8 @@ export const CDNRoutes = {
13621362
};
13631363

13641364
for (const [key, fn] of Object.entries(CDNRoutes)) {
1365-
CDNRoutes[key] = (...args: string[]) => {
1366-
const escaped = args.map((arg) => encodeURIComponent(arg));
1365+
CDNRoutes[key as keyof typeof CDNRoutes] = (...args: (number | string | undefined)[]) => {
1366+
const escaped = args.map((arg) => arg && encodeURIComponent(arg));
13671367
// eslint-disable-next-line no-useless-call
13681368
return fn.call(null, ...escaped);
13691369
};

rest/v9/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,8 +1063,8 @@ export const Routes = {
10631063
};
10641064

10651065
for (const [key, fn] of Object.entries(Routes)) {
1066-
Routes[key] = (...args: string[]) => {
1067-
const escaped = args.map((arg) => encodeURIComponent(arg));
1066+
Routes[key as keyof typeof Routes] = (...args: (boolean | number | string | undefined)[]) => {
1067+
const escaped = args.map((arg) => arg && encodeURIComponent(arg));
10681068
// eslint-disable-next-line no-useless-call
10691069
return fn.call(null, ...escaped);
10701070
};
@@ -1371,8 +1371,8 @@ export const CDNRoutes = {
13711371
};
13721372

13731373
for (const [key, fn] of Object.entries(CDNRoutes)) {
1374-
CDNRoutes[key] = (...args: string[]) => {
1375-
const escaped = args.map((arg) => encodeURIComponent(arg));
1374+
CDNRoutes[key as keyof typeof CDNRoutes] = (...args: (number | string | undefined)[]) => {
1375+
const escaped = args.map((arg) => arg && encodeURIComponent(arg));
13761376
// eslint-disable-next-line no-useless-call
13771377
return fn.call(null, ...escaped);
13781378
};

0 commit comments

Comments
 (0)