diff --git a/socket.io-client/socket.io-client-tests.ts b/socket.io-client/socket.io-client-tests.ts index 215932c46..cd9be6d3d 100644 --- a/socket.io-client/socket.io-client-tests.ts +++ b/socket.io-client/socket.io-client-tests.ts @@ -55,3 +55,7 @@ function testUsingItJustAsACrossBrowserWebSocket() { }); }); } + +function testSettingReconnectionAttempts() { + var manager = io.Manager({ reconnection: true, timeout: 0, reconnectionAttempts: 2, reconnectionDelay: 10 }); +} diff --git a/socket.io-client/socket.io-client.d.ts b/socket.io-client/socket.io-client.d.ts index 9f93c1f16..32f51aea4 100644 --- a/socket.io-client/socket.io-client.d.ts +++ b/socket.io-client/socket.io-client.d.ts @@ -458,7 +458,7 @@ declare module SocketIOClient { * How many reconnection attempts should we try? * @default Infinity */ - reconnectionAttempts?: boolean; + reconnectionAttempts?: number; /** * The time delay in milliseconds between reconnection attempts