File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ export default class Echo<T extends keyof Broadcaster> {
47
47
} else if ( this . options . broadcaster == 'null' ) {
48
48
this . connector = new NullConnector ( this . options ) ;
49
49
} else if ( typeof this . options . broadcaster == 'function' ) {
50
- this . connector = new this . options . broadcaster ( this . options as EchoOptions < 'function' > ) ;
50
+ this . connector = this . options . broadcaster ( this . options as EchoOptions < 'function' > ) ;
51
51
} else {
52
52
throw new Error (
53
53
`Broadcaster ${ typeof this . options . broadcaster } ${ this . options . broadcaster } is not supported.`
@@ -226,7 +226,7 @@ type Broadcaster = {
226
226
connector : SocketIoConnector ,
227
227
public : SocketIoPublicChannel ,
228
228
private : SocketIoPrivateChannel ,
229
- encrypted : any ,
229
+ encrypted : never ,
230
230
presence : SocketIoPresenceChannel ,
231
231
} ,
232
232
'null' : {
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ describe('Echo', () => {
21
21
} ) ;
22
22
23
23
test ( 'it will throw error for unsupported driver' , ( ) => {
24
+ // @ts -ignore
24
25
expect ( ( ) => new Echo ( { broadcaster : 'foo' } ) ) . toThrowError ( 'Broadcaster string foo is not supported.' ) ;
25
26
} ) ;
26
27
} ) ;
You can’t perform that action at this time.
0 commit comments