File tree 3 files changed +15
-8
lines changed
3 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -28,11 +28,7 @@ function lookup(
28
28
opts ?: Partial < ManagerOptions & SocketOptions >
29
29
) : Socket ;
30
30
function lookup (
31
- uri : string | Partial < ManagerOptions & SocketOptions > ,
32
- opts ?: Partial < ManagerOptions & SocketOptions >
33
- ) : Socket ;
34
- function lookup (
35
- uri : string | Partial < ManagerOptions & SocketOptions > ,
31
+ uri ?: string | Partial < ManagerOptions & SocketOptions > ,
36
32
opts ?: Partial < ManagerOptions & SocketOptions >
37
33
) : Socket {
38
34
if ( typeof uri === "object" ) {
Original file line number Diff line number Diff line change 10
10
* @see https://webdriver.io/docs/frameworks/#using-mocha
11
11
* @param fn
12
12
*/
13
- export function wrap ( fn ) {
14
- return new Promise ( ( resolve ) => fn ( resolve ) ) ;
13
+ export function wrap ( fn : ( done : ( err ?: Error ) => void ) => void ) {
14
+ return new Promise < Error > ( ( resolve ) => fn ( resolve ) ) ;
15
15
}
16
16
17
17
export function success ( done , socket ) {
Original file line number Diff line number Diff line change 1
1
import { io , Socket } from ".." ;
2
2
import type { DefaultEventsMap } from "@socket.io/component-emitter" ;
3
3
import { expectError , expectType } from "tsd" ;
4
- import { createServer } from "http" ;
5
4
6
5
// This file is run by tsd, not mocha.
7
6
7
+ describe ( "init" , ( ) => {
8
+ io ( ) ;
9
+ io ( "https://example.com" ) ;
10
+ io ( {
11
+ forceNew : true ,
12
+ } ) ;
13
+ io ( "https://example.com" , {
14
+ forceNew : true ,
15
+ } ) ;
16
+ io ( process . env . NODE_ENV === "production" ? "https://example.com" : undefined ) ;
17
+ } ) ;
18
+
8
19
describe ( "typed events" , ( ) => {
9
20
describe ( "no event map" , ( ) => {
10
21
describe ( "on" , ( ) => {
You can’t perform that action at this time.
0 commit comments