mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Merge pull request #29233 from szechyjs/fix_actioncable
[actioncable] Add missing function to Cable/Consumer interface
This commit is contained in:
Vendored
+10
-4
@@ -1,13 +1,15 @@
|
||||
// Type definitions for ActionCable
|
||||
// Project: https://github.com/rails/rails/tree/master/actioncable
|
||||
// Type definitions for ActionCable 5.2
|
||||
// Project: https://github.com/rails/rails/tree/master/actioncable/app/assets/javascripts
|
||||
// Definitions by: Vincent Zhu <https://github.com/zhu1230>
|
||||
// Jared Szechy <https://github.com/szechyjs>
|
||||
// Definitions: https://github.com/zhu1230/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
declare module ActionCable {
|
||||
interface Channel {
|
||||
unsubscribe(): void;
|
||||
perform(action: string, data: {}): void;
|
||||
send(data: Object): boolean;
|
||||
send(data: any): boolean;
|
||||
}
|
||||
|
||||
interface Subscriptions {
|
||||
@@ -16,12 +18,16 @@ declare module ActionCable {
|
||||
|
||||
interface Cable {
|
||||
subscriptions: Subscriptions;
|
||||
send(data: any): void;
|
||||
connect(): void;
|
||||
disconnect(): void;
|
||||
ensureActiveConnection(): void;
|
||||
}
|
||||
|
||||
interface CreateMixin {
|
||||
connected(): void;
|
||||
disconnected(): void;
|
||||
received(obj: Object): void;
|
||||
received(obj: any): void;
|
||||
[key: string]: Function;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user