Closed
Description
Using tslib 1.12.0, we are seeing the following error being thrown:
TypeError: Cannot set property foo of #<Object> which has only a getter
This is a result of this commit, which changes __exportStar
to use __createBinding
, which now uses Object.defineProperty
to create a readonly property on exports
.
The implication is that it's no longer possible to do this in TypeScript:
# module1
export function foo() { /* do something */ }
# module2
export * from 'module1';
export function foo() { /* do another thing */ }
This differs from CommonJS behavior, where it is possible to overwrite previous exports.
Metadata
Metadata
Assignees
Labels
No labels