-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
fix eth packages typing issue, not export default #3198 #3732
Conversation
@@ -26,6 +26,7 @@ | |||
}, | |||
"devDependencies": { | |||
"dtslint": "^3.4.1", | |||
"typescript": "^3.9.5" | |||
"typescript": "^3.9.5", | |||
"web3-eth": "1.3.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this (web3-eth
) be a dependency?
So I'm a little confused on why we would want to do something like: import Contract, { ContractOptions} from 'web3-eth-contract'; If we update the packages, in this case export default {
Contract,
ContractOptions
} You would still be able to do: import { Contract, ContractOptions} from 'web3-eth-contract'; Am I mistaken, is there a reason you wouldn't want to do it that way? |
@spacesailor24 module.exports = Contract; for ES module it equals If we change the export will bring API broken change, this commit is only for quick fix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix #3732
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export
import
default
|
This PR has been automatically marked as stale beacause it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment. |
Description
Please include a summary of the changes and be sure to follow our Contribution Guidelines.
typing issue, export is not correct.
Type of change
Checklist:
npm run dtslint
with success and extended the tests and types if necessary.npm run test:unit
with success.npm run test:cov
and my test cases cover all the lines and branches of the added code.npm run build
and testeddist/web3.min.js
in a browser.CHANGELOG.md
file in the root folder.