From eab66d410d7170628ca54fffbc47200a5cefd9d7 Mon Sep 17 00:00:00 2001 From: Shunichi Ikegami Date: Sun, 26 Oct 2025 16:14:17 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#73967=20feat(rails?= =?UTF-8?q?=5F=5Factioncable):=20Add=20Subscription.send()=20method=20by?= =?UTF-8?q?=20@shunichi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/rails__actioncable/index.d.ts | 1 + types/rails__actioncable/rails__actioncable-tests.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/types/rails__actioncable/index.d.ts b/types/rails__actioncable/index.d.ts index 6acee50f973973..5d5fe1506f5e1d 100644 --- a/types/rails__actioncable/index.d.ts +++ b/types/rails__actioncable/index.d.ts @@ -41,6 +41,7 @@ export class Subscription { constructor(consumer: Consumer, params: ChannelNameWithParams, mixin: M); perform(action: string, data?: object): boolean; + send(data: any): boolean; unsubscribe(): this; } diff --git a/types/rails__actioncable/rails__actioncable-tests.ts b/types/rails__actioncable/rails__actioncable-tests.ts index 06b26fa362c924..f6339916c68d30 100644 --- a/types/rails__actioncable/rails__actioncable-tests.ts +++ b/types/rails__actioncable/rails__actioncable-tests.ts @@ -53,6 +53,7 @@ consumer.disconnect(); // $ExpectType void subscription.away(); subscription.perform("action"); // $ExpectType boolean subscription.perform("action", {}); // $ExpectType boolean + subscription.send({ hello: "world" }); // $ExpectType boolean subscription.unsubscribe(); // @ts-expect-error (typo)