From 4cbe93cb5f4d99e1cc6047cea6d958ff46263035 Mon Sep 17 00:00:00 2001 From: Ame_x <121654029+EdamAme-x@users.noreply.github.com> Date: Tue, 28 May 2024 02:49:39 +0000 Subject: [PATCH 1/3] refactor: remove some any of helper/testing --- src/helper/testing/index.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/helper/testing/index.ts b/src/helper/testing/index.ts index 1807bffd1..f6da0c927 100644 --- a/src/helper/testing/index.ts +++ b/src/helper/testing/index.ts @@ -7,13 +7,12 @@ import { hc } from '../../client' import type { Client } from '../../client/types' import type { ExecutionContext } from '../../context' import type { Hono } from '../../hono' +import type { Env, Schema } from '../../types' import type { UnionToIntersection } from '../../utils/types' -// eslint-disable-next-line @typescript-eslint/no-explicit-any -type ExtractEnv = T extends Hono ? E : never +type ExtractEnv = T extends Hono ? E : never -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export const testClient = >( +export const testClient = >( app: T, Env?: ExtractEnv['Bindings'] | {}, executionCtx?: ExecutionContext From 85fa1a23cf69abf094cecb751c4a52459cf9782c Mon Sep 17 00:00:00 2001 From: Ame_x <121654029+EdamAme-x@users.noreply.github.com> Date: Tue, 28 May 2024 12:36:28 +0900 Subject: [PATCH 2/3] fix --- src/helper/testing/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/helper/testing/index.ts b/src/helper/testing/index.ts index f6da0c927..7d050418a 100644 --- a/src/helper/testing/index.ts +++ b/src/helper/testing/index.ts @@ -12,7 +12,8 @@ import type { UnionToIntersection } from '../../utils/types' type ExtractEnv = T extends Hono ? E : never -export const testClient = >( +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export const testClient = >( app: T, Env?: ExtractEnv['Bindings'] | {}, executionCtx?: ExecutionContext From 67dda5927ae5240a1c3ae7986bda588dbb3b760e Mon Sep 17 00:00:00 2001 From: Ame_x <121654029+EdamAme-x@users.noreply.github.com> Date: Wed, 29 May 2024 08:01:27 +0900 Subject: [PATCH 3/3] remove unused types --- src/helper/testing/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helper/testing/index.ts b/src/helper/testing/index.ts index 7d050418a..edf3b3e31 100644 --- a/src/helper/testing/index.ts +++ b/src/helper/testing/index.ts @@ -7,7 +7,7 @@ import { hc } from '../../client' import type { Client } from '../../client/types' import type { ExecutionContext } from '../../context' import type { Hono } from '../../hono' -import type { Env, Schema } from '../../types' +import type { Schema } from '../../types' import type { UnionToIntersection } from '../../utils/types' type ExtractEnv = T extends Hono ? E : never