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
For various reasons, I use parameters and defaults to link between items and make sure that referenced things are being retained.
In particular, looking at the synthetic AST, I would expect that A is retained because I could "in theory" get a reference to it by doing a typeQuery()[1]()[0].
Rollup Version
2.75
Operating System (or Browser)
any
Node Version (if applicable)
No response
Link To Reproduction
https://rollupjs.org/repl/?version=2.75.1&shareable=JTdCJTIybW9kdWxlcyUyMiUzQSU1QiU3QiUyMm5hbWUlMjIlM0ElMjJtYWluLmpzJTIyJTJDJTIyY29kZSUyMiUzQSUyMmZ1bmN0aW9uJTIwQSgpJTIwJTdCJTdEJTVDbmZ1bmN0aW9uJTIwYShfMSUyMCUzRCUyMEEpJTIwJTdCcmV0dXJuJTIwJTVCXzElNUQlN0QlNUNuZnVuY3Rpb24lMjB0eXBlUXVlcnkoXzIlMjAlM0QlMjB0eXBlUXVlcnklMkMlMjBfMyUyMCUzRCUyMGEpJTIwJTdCcmV0dXJuJTIwJTVCXzIlMkNfMyU1RCU3RCU1Q25leHBvcnQlMjAlN0J0eXBlUXVlcnklN0QlMjIlMkMlMjJpc0VudHJ5JTIyJTNBdHJ1ZSU3RCU1RCUyQyUyMm9wdGlvbnMlMjIlM0ElN0IlMjJmb3JtYXQlMjIlM0ElMjJlcyUyMiUyQyUyMm5hbWUlMjIlM0ElMjJteUJ1bmRsZSUyMiUyQyUyMmFtZCUyMiUzQSU3QiUyMmlkJTIyJTNBJTIyJTIyJTdEJTJDJTIyZ2xvYmFscyUyMiUzQSU3QiU3RCU3RCUyQyUyMmV4YW1wbGUlMjIlM0FudWxsJTdE
Expected Behaviour
In
rollup-plugin-dts
, I synthesize a fake AST for typescript definitions.As an example, I turn the following TS code:
Into a synthetic AST representing something like:
For various reasons, I use parameters and defaults to link between items and make sure that referenced things are being retained.
In particular, looking at the synthetic AST, I would expect that
A
is retained because I could "in theory" get a reference to it by doing atypeQuery()[1]()[0]
.Actual Behaviour
As reported in Swatinem/rollup-plugin-dts#208, the recent changes in #4510 broke this use-case.
As the REPL shows, the synthetic example is being reduced to:
That seems to be wrong, as I can no longer get to
A
by doingtypeQuery()[1]()[0]
.The text was updated successfully, but these errors were encountered: