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

Add example import for package level types #4611

Merged
merged 3 commits into from
Jan 21, 2022
Merged

Conversation

jgresham
Copy link

@jgresham jgresham commented Dec 8, 2021

I couldn't find an example import for package level types documented elsewhere

Description

Please include a summary of the changes and be sure to follow our Contribution Guidelines.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

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 dtslint with success and extended the tests and types if necessary.
  • I ran npm run test:unit with success.
  • I ran npm run test:cov and my test cases cover all the lines and branches of the added code.
  • I ran npm run build and tested dist/web3.min.js in a browser.
  • I have tested my code on the live network.
  • I have checked the Deploy Preview and it looks correct.
  • I have updated the CHANGELOG.md file in the root folder.

I couldn't find an example import for package level types documented elsewhere
README.md Show resolved Hide resolved
@nazarhussain nazarhussain added 1.x 1.0 related issues Changes Requested Requires further changes Needs Clarification Requires additional input labels Dec 9, 2021
@nazarhussain
Copy link
Contributor

Hi @jgresham Thanks for contribution. I posted some feedback. In addition to it I suggest you to create an issue on Github repo and link your PR to it. Also create an entry to CHANGELOG.md specifying your PR.

@nazarhussain nazarhussain added the Review Needed Maintainer(s) need to review label Dec 9, 2021
@jgresham
Copy link
Author

jgresham commented Dec 16, 2021

@nazarhussain When I wanted to import the Block type from web3, I did not know where to import them from. I intuitively thought it would be import { Block } from 'web3' but that was not the case and I had to search web3 source code to find the import. Perhaps I am missing a tool which would have automatically found that it is import { Block } from 'web3-eth'.. but if this is not a common tool that users have installed, then I think it would benefit users to have this documented somewhere. If needed, where would you suggest it be documented?

@nazarhussain
Copy link
Contributor

@jgresham As we are focused on 4.x rewrite which is done completely in Typescript. So you will be get more safe and more consistent developer experience with that release. For 1.x seems mentioning it the README is fine.

@nazarhussain nazarhussain removed Needs Clarification Requires additional input Changes Requested Requires further changes labels Dec 17, 2021
@spacesailor24 spacesailor24 merged commit b8baafa into web3:1.x Jan 21, 2022
@jdevcs jdevcs mentioned this pull request Feb 10, 2022
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 Review Needed Maintainer(s) need to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants