Improve error message given when a property is only exposed as a getter #2531
Labels
Cannot reproduce
For issues we are unable to reproduce.
Difficulty: Easy
Documentation
Feature Request
Property accessors
Property Getters/Setters
semver:patch
changes will cause a new patch version
Is your feature request related to a problem? Please describe.
Confusion arises when module exports are not transpiled into an expected form . Typically you expect
module.myExport = stub()
to make sense, but ifmyExport
is really just a getter you will not be able to assign to that prop. See #2530Describe the solution you'd like
We should try to detect such cases and give some more meaningful error message, given the context. We could have some elaboration on our homepage and then link to that in the error message.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
See #2530
The text was updated successfully, but these errors were encountered: