mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 07:32:44 +00:00
fix(hooks): resolve type/lint errors from CI check failure
Arrow function passed to registerInternalHook was implicitly returning the number from Array.push(), which is not assignable to void | Promise<void>. Use block body to discard the return value.
This commit is contained in:
committed by
Peter Steinberger
parent
e0b8b80067
commit
7ad6a04058
@@ -359,7 +359,9 @@ describe("message hooks", () => {
|
|||||||
|
|
||||||
it("should preserve sessionKey across event lifecycle", async () => {
|
it("should preserve sessionKey across event lifecycle", async () => {
|
||||||
const events: InternalHookEvent[] = [];
|
const events: InternalHookEvent[] = [];
|
||||||
registerInternalHook("message", (e) => events.push(e));
|
registerInternalHook("message", (e) => {
|
||||||
|
events.push(e);
|
||||||
|
});
|
||||||
|
|
||||||
await triggerInternalHook(
|
await triggerInternalHook(
|
||||||
createInternalHookEvent("message", "received", "agent:main:telegram:abc", {
|
createInternalHookEvent("message", "received", "agent:main:telegram:abc", {
|
||||||
|
|||||||
Reference in New Issue
Block a user