From bba99cd97054d96431c5ddac970bb2b7f2e49a1c Mon Sep 17 00:00:00 2001 From: Haitao Pan Date: Tue, 5 May 2026 11:16:21 +0800 Subject: [PATCH] Fix CI plugin SDK test type --- index.test.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/index.test.ts b/index.test.ts index fca5bc3..5f5953e 100644 --- a/index.test.ts +++ b/index.test.ts @@ -1,14 +1,16 @@ -import type { GatewayRequestHandler, OpenClawPluginApi } from "openclaw/plugin-sdk"; +import type { OpenClawPluginApi } from "openclaw/plugin-sdk"; import { describe, expect, it } from "vitest"; import register from "./index.js"; +type GatewayMethodHandler = Parameters[1]; + describe("plugin registration", () => { it("registers the xworkmate artifact export gateway method", () => { - const methods: Array<{ method: string; handler: GatewayRequestHandler }> = []; + const methods: Array<{ method: string; handler: GatewayMethodHandler }> = []; const api = { config: {}, pluginConfig: {}, - registerGatewayMethod: (method: string, handler: GatewayRequestHandler) => { + registerGatewayMethod: (method: string, handler: GatewayMethodHandler) => { methods.push({ method, handler }); }, } as unknown as OpenClawPluginApi;