File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -18,11 +18,13 @@ export const adapters: {
1818 */
1919export class Consumer {
2020 readonly subscriptions : Subscriptions ;
21+ readonly subprotocols : string [ ] ;
2122
2223 constructor ( url : string ) ;
2324 get url ( ) : string ;
2425 connect ( ) : boolean ;
2526 disconnect ( ) : void ;
27+ addSubProtocol ( protocol : string ) : void ;
2628}
2729
2830export interface BaseMixin {
Original file line number Diff line number Diff line change @@ -9,9 +9,11 @@ const consumer = createConsumer("url"); // $ExpectType Consumer
99createConsumer ( ( ) => "url" ) ; // $ExpectType Consumer
1010
1111consumer . url ; // $ExpectType string
12+ consumer . subprotocols ; // $ExpectType string[]
1213
1314consumer . connect ( ) ; // $ExpectType boolean
1415consumer . disconnect ( ) ; // $ExpectType void
16+ consumer . addSubProtocol ( "custom-protocol" ) ; // $ExpectType void
1517
1618{
1719 const subscription = consumer . subscriptions . create (
You can’t perform that action at this time.
0 commit comments