-
Notifications
You must be signed in to change notification settings - Fork 126
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
__createBinding assumes exports are readonly #103
Comments
Same issue as #102 |
To maintain the "live binding", which seems to be the reasoning behind this change, can it also have a setter? e.g.: Object.defineProperty(o, k2, {
enumerable: true,
get: function() { return m[k]; },
set: function(v) { m[k] = v; }
}); |
This is only an issue when using |
@DanielRosenwasser We might need to remark that the new version of |
can fix this issue as soon as possible ? typeorm package can not use any more |
Please consider making this a major release.
Narrowing down to the root cause turns out to being really painful. @linxiaowu66, |
Is it only a problem when older versions use |
Our current plan is outlined over at #109. Can we get some feedback from users on this thread? |
1.13.0 should be available for those impacted by the change. Users on TypeScript 3.9 should look into using tslib 2.0.0. |
@DanielRosenwasser & @weswigham, thank you for the quick turn around! |
Yes, thank you! Much appreciated. ❤️ |
Using tslib 1.12.0, we are seeing the following error being thrown:
This is a result of this commit, which changes
__exportStar
to use__createBinding
, which now usesObject.defineProperty
to create a readonly property onexports
.The implication is that it's no longer possible to do this in TypeScript:
This differs from CommonJS behavior, where it is possible to overwrite previous exports.
The text was updated successfully, but these errors were encountered: