From 19888d52dcebdbfda0910dba90ba3b93cebad97b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Sat, 15 Nov 2025 12:02:07 +0800 Subject: [PATCH] Remove unused test utility files Deleted test.ts and test2.ts from utils as they are no longer needed for the project. --- packages/napcat-shell/utils/test.ts | 31 ---------------------------- packages/napcat-shell/utils/test2.ts | 31 ---------------------------- 2 files changed, 62 deletions(-) delete mode 100644 packages/napcat-shell/utils/test.ts delete mode 100644 packages/napcat-shell/utils/test2.ts diff --git a/packages/napcat-shell/utils/test.ts b/packages/napcat-shell/utils/test.ts deleted file mode 100644 index ce82df29..00000000 --- a/packages/napcat-shell/utils/test.ts +++ /dev/null @@ -1,31 +0,0 @@ -// 日志装饰器 -function log2(target: any, propertyKey: string, descriptor: PropertyDescriptor) { - const originalMethod = descriptor.value; - - descriptor.value = function (...args: any[]) { - console.log(`Calling ${propertyKey} with args: ${JSON.stringify(args)}`); - const result = originalMethod.apply(this, args); - console.log(`${propertyKey} returned: ${result}`); - return result; - }; - - return descriptor; -} - -// 示例类 -class MathOperations2 { - @log2 - add(a: number, b: number): number { - return a + b; - } - - @log2 - multiply(a: number, b: number): number { - return a * b; - } -} - -// 创建实例并调用方法 -const math2 = new MathOperations2(); -math2.add(1, 2); // 调用加法 -math2.multiply(3, 4); // 调用乘法 \ No newline at end of file diff --git a/packages/napcat-shell/utils/test2.ts b/packages/napcat-shell/utils/test2.ts deleted file mode 100644 index 803ed478..00000000 --- a/packages/napcat-shell/utils/test2.ts +++ /dev/null @@ -1,31 +0,0 @@ -// 日志装饰器 -function log(target: any, propertyKey: string, descriptor: PropertyDescriptor) { - const originalMethod = descriptor.value; - - descriptor.value = function (...args: any[]) { - console.log(`Calling ${propertyKey} with args: ${JSON.stringify(args)}`); - const result = originalMethod.apply(this, args); - console.log(`${propertyKey} returned: ${result}`); - return result; - }; - - return descriptor; -} - -// 示例类 -class MathOperations { - @log - add(a: number, b: number): number { - return a + b; - } - - @log - multiply(a: number, b: number): number { - return a * b; - } -} - -// 创建实例并调用方法 -const math = new MathOperations(); -math.add(1, 2); // 调用加法 -math.multiply(3, 4); // 调用乘法