Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit d46d922

Browse files
jdevcswbt
andauthored
Make disconnect params optional in types (#4833) (#4883)
* Make disconnect params optional in types * Update changelog, including PR number * Update refs to old discussions, mostly just to kick off CI again. * PR under 1.7.2 Co-authored-by: wbt <wbt@users.noreply.github.com>
1 parent 832271a commit d46d922

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,4 +533,4 @@ Released with 1.0.0-beta.37 code base.
533533

534534
### Fixed
535535
- Fix jsonrpc payload and response types (#4743) (#4761)
536-
536+
- Allowed more flexibility in typing the overly constrained `provider.disconnect` function (#4833)

CONTRIBUTIONS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,5 @@ Emergency releases are allowed to shorten waiting periods depending on the sever
4848

4949
There is precedent set for this in the 1.2.6 release (see [#3351](https://github.com/ethereum/web3.js/pull/3351)), where the consensus view was to make the smallest change necessary to address the emergency while waiving the `rc` process (meaning many existing additions to master were excluded).
5050

51-
This topic is under further org-wide discussion at [ethereum/js-organization#6](https://github.com/ethereum/js-organization/issues/6).
51+
This topic was under further org-wide discussion [here](https://github.com/ethereum/js-organization/issues/6)
52+
and [here](https://github.com/ChainSafe/web3.js/issues/3358).

packages/web3-core-helpers/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export class WebsocketProviderBase {
117117

118118
reset(): void;
119119

120-
disconnect(code: number, reason: string): void;
120+
disconnect(code?: number, reason?: string): void;
121121

122122
connect(): void;
123123

0 commit comments

Comments
 (0)