Skip to content

Commit

Permalink
TS v5 support (#6195)
Browse files Browse the repository at this point in the history
* updated PrimitiveTupleType type to allow unknown

* @types/node update

* changelog update

* changelog update
  • Loading branch information
jdevcs authored Jun 15, 2023
1 parent f8a2533 commit 2130d22
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"@cypress/webpack-preprocessor": "^5.12.0",
"@droppedcode/typedoc-plugin-relative-includes": "^1.0.2",
"@openzeppelin/contracts": "^4.7.1",
"@types/node": "^17.0.40",
"@types/node": "^18.11.9",
"@types/webpack": "^5.28.0",
"assert": "^2.0.0",
"buffer": "^6.0.3",
Expand Down
4 changes: 4 additions & 0 deletions packages/web3-eth-ens/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,7 @@ Documentation:
[Migration Guide from 1.x](https://docs.web3js.org/guides/web3_upgrade_guide/x/)

## [Unreleased]

### Fixed

- Fixed bug #6185, now web3.js compiles on typescript v5 (#6195)
4 changes: 4 additions & 0 deletions packages/web3-types/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,7 @@ Documentation:
[Migration Guide from 1.x](https://docs.web3js.org/guides/web3_upgrade_guide/x/)

## [Unreleased]

### Fixed

- Fixed bug #6185, now web3.js compiles on typescript v5 (#6195)
4 changes: 2 additions & 2 deletions packages/web3-types/src/eth_abi_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ export type PrimitiveBytesType<Type extends string> = Type extends `bytes${strin

export type PrimitiveTupleType<
Type extends string,
TypeComponents extends ReadonlyArray<AbiParameter> | undefined = [],
TypeComponents extends ReadonlyArray<AbiParameter> | undefined | unknown = [],
> = TypeComponents extends ReadonlyArray<AbiParameter>
? Type extends 'tuple'
? {
Expand Down Expand Up @@ -251,7 +251,7 @@ type ArrToObjectWithFunctions<T extends unknown[]> = Array<unknown> & ObjectToAr

export type MatchPrimitiveType<
Type extends string,
TypeComponents extends ReadonlyArray<AbiParameter> | undefined,
TypeComponents extends ReadonlyArray<AbiParameter> | undefined | unknown,
> =
| PrimitiveAddressType<Type>
| PrimitiveStringType<Type>
Expand Down
4 changes: 4 additions & 0 deletions packages/web3/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,7 @@ Documentation:
### Added

- Exported `Web3Context`, `Web3PluginBase`, `Web3EthPluginBase` from `'web3-core'`, and `Web3Validator` from `'web3-validator'` (#6165)

### Fixed

- Fixed bug #6185, now web3.js compiles on typescript v5 (#6195)
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2114,10 +2114,10 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.6.tgz#31743bc5772b6ac223845e18c3fc26f042713c83"
integrity sha512-EdxgKRXgYsNITy5mjjXjVE/CS8YENSdhiagGrLqjG0pvA2owgJ6i4l7wy/PFZGC0B1/H20lWKN7ONVDNYDZm7A==

"@types/node@^17.0.40":
version "17.0.45"
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.45.tgz#2c0fafd78705e7a18b7906b5201a522719dc5190"
integrity sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==
"@types/node@^18.11.9":
version "18.16.18"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.16.18.tgz#85da09bafb66d4bc14f7c899185336d0c1736390"
integrity sha512-/aNaQZD0+iSBAGnvvN2Cx92HqE5sZCPZtx2TsK+4nvV23fFe09jVDvpArXr2j9DnYlzuU9WuoykDDc6wqvpNcw==

"@types/normalize-package-data@^2.4.0":
version "2.4.1"
Expand Down

0 comments on commit 2130d22

Please sign in to comment.