Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

web3-eth exporting of types from web3-core #3200

Merged
merged 3 commits into from
Nov 14, 2019
Merged

web3-eth exporting of types from web3-core #3200

merged 3 commits into from
Nov 14, 2019

Conversation

nivida
Copy link
Contributor

@nivida nivida commented Nov 13, 2019

Description

This PR will improve the DX for TS developers.

Fixes #3197

Type of change

  • Types

Checklist:

  • I have selected the correct base branch.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • Any dependent changes have been merged and published in downstream modules.
  • I ran npm run test with success and extended the tests if necessary.
  • I ran npm run build and tested the resulting file from dist folder in a browser.
  • I have tested my code on the live network.

…ionReceipt, Common, hardfork, and chain export to the web3-eth types. Those interfaces and type definitions will be used from the TS developers
@nivida nivida added Types Incorrect or missing types 1.x 1.0 related issues labels Nov 13, 2019
@nivida nivida marked this pull request as ready for review November 13, 2019 09:04
@nivida nivida requested a review from cgewecke November 13, 2019 09:06
@coveralls
Copy link

coveralls commented Nov 13, 2019

Coverage Status

Coverage remained the same at 84.347% when pulling 531dd47 on issue/3197 into 72d1da0 on 1.x.

Copy link
Collaborator

@cgewecke cgewecke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm seeing the truffle e2e CI fail on tsc because it can't find Block exported from web3-eth.

$ tsc
lib/interface-adapter/types/index.d.ts:1:10 - error TS2305: Module '"../../../node_modules/web3-eth/types"' has no exported member 'Block'.
1 import { Block as EvmBlock } from "web3-eth";
           ~~~~~
Found 1 error.

It looks like it was removed in this commit.

Is there any way of restoring that as an alias in this PR?

See also #3150

@nivida
Copy link
Contributor Author

nivida commented Nov 14, 2019

Is there any way of restoring that as an alias in this PR?

Added the Block interface with a TODO comment to remove this type on a minor release.

@nivida nivida requested a review from cgewecke November 14, 2019 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x 1.0 related issues Types Incorrect or missing types
Projects
None yet
Development

Successfully merging this pull request may close these issues.

web3-eth should export TransactionConfig
4 participants