Skip to content

Commit 21fba19

Browse files
committed
refactor(node): Use unknown instead of any
1 parent cb1a52e commit 21fba19

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

packages/node/src/integrations/tracing/hono/instrumentation.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ export class HonoInstrumentation extends InstrumentationBase {
3333
const instrumentation = this;
3434

3535
moduleExports.Hono = class HonoWrapper extends moduleExports.Hono {
36-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
37-
public constructor(...args: any[]) {
36+
public constructor(...args: unknown[]) {
3837
super(...args);
3938

4039
instrumentation._wrap(this, 'get', instrumentation._patchHandler());
@@ -56,8 +55,7 @@ export class HonoInstrumentation extends InstrumentationBase {
5655
*/
5756
private _patchHandler(): (original: HandlerInterface) => HandlerInterface {
5857
return function(original: HandlerInterface) {
59-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
60-
return function wrappedHandler(this: HonoInstance, ...args: any) {
58+
return function wrappedHandler(this: HonoInstance, ...args: unknown[]) {
6159
// TODO: Add OpenTelemetry tracing logic here
6260
return original.apply(this, args);
6361
};
@@ -69,8 +67,7 @@ export class HonoInstrumentation extends InstrumentationBase {
6967
*/
7068
private _patchOnHandler(): (original: OnHandlerInterface) => OnHandlerInterface {
7169
return function(original: OnHandlerInterface) {
72-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
73-
return function wrappedHandler(this: HonoInstance, ...args: any) {
70+
return function wrappedHandler(this: HonoInstance, ...args: unknown[]) {
7471
// TODO: Add OpenTelemetry tracing logic here
7572
return original.apply(this, args);
7673
};
@@ -82,8 +79,7 @@ export class HonoInstrumentation extends InstrumentationBase {
8279
*/
8380
private _patchMiddlewareHandler(): (original: MiddlewareHandlerInterface) => MiddlewareHandlerInterface {
8481
return function(original: MiddlewareHandlerInterface) {
85-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
86-
return function wrappedHandler(this: HonoInstance, ...args: any) {
82+
return function wrappedHandler(this: HonoInstance, ...args: unknown[]) {
8783
// TODO: Add OpenTelemetry tracing logic here
8884
return original.apply(this, args);
8985
};

packages/node/src/integrations/tracing/hono/types.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,4 @@ export interface HonoInstance {
4747
use: MiddlewareHandlerInterface;
4848
}
4949

50-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
51-
export type Hono = new (...args: any[]) => HonoInstance;
50+
export type Hono = new (...args: unknown[]) => HonoInstance;

0 commit comments

Comments
 (0)