You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Should create unique symbols when creating properties on module.exports #37404
Hm. I didn't realize we issued the Cannot redeclare exported variable 'customSymbol'. error - I'm surprised we do, actually, considering there's no such limitation for cjs modules. Afaik we shouldn't be.
👋 Hi, I'm the Repro bot. I can help narrow down and track compiler bugs across releases! This comment reflects the current state of the repro in this issue running against the nightly TypeScript.
Activity
RyanCavanaugh commentedon Mar 16, 2020
Ron Buckton (@rbuckton) Wesley Wigham (@weswigham) what do we think should happen here?
weswigham commentedon Mar 16, 2020
We don't make unique symbols because we see the position as mutable, ie,
is perfectly acceptable.
In theory, we could recognize
as making the
customSymbolproperty immutable and thus the symbol appropriatelyunique, but we currently do not.ExE-Boss commentedon Mar 16, 2020
But TypeScript complains when you re‑assign a property on
module.exportswith:Also, that code looks like a bug to me, so I don’t think it should be the default.
Also, if you do: (🔗)
Then you get:
weswigham commentedon Mar 16, 2020
Hm. I didn't realize we issued the
Cannot redeclare exported variable 'customSymbol'.error - I'm surprised we do, actually, considering there's no such limitation for cjs modules. Afaik we shouldn't be.typescript-bot commentedon Mar 12, 2021
👋 Hi, I'm the Repro bot. I can help narrow down and track compiler bugs across releases! This comment reflects the current state of the repro in this issue running against the nightly TypeScript.
Issue body code block by ExE Boss (@ExE-Boss)
(property) customSymbol: symbolHistorical Information
Issue body code block by ExE Boss (@ExE-Boss)
(property) customSymbol: symbol