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
which is an error (double declaration of Document_createElement).
We could do something complicated, detecting existing bindings and routing around them (e.g. instead of the import being named Document_createElement it could be named Document_createElement1).
But that would be overkill. We should instead just make it clear up front that input code should not contain identifiers with underscores in it. We can recommend the ESLint rule which checks this, even.
If we felt that was too restrictive, we could alias everything to have some prefix (e.g. o_Document_createElement or $Document_createElement) and then document that restriction instead.
The text was updated successfully, but these errors were encountered:
We're starting to introduce new identifiers, specifically via imports, and depend on them. But consider the following program:
this will get transformed in to
which is an error (double declaration of
Document_createElement
).We could do something complicated, detecting existing bindings and routing around them (e.g. instead of the import being named
Document_createElement
it could be namedDocument_createElement1
).But that would be overkill. We should instead just make it clear up front that input code should not contain identifiers with underscores in it. We can recommend the ESLint rule which checks this, even.
If we felt that was too restrictive, we could alias everything to have some prefix (e.g.
o_Document_createElement
or$Document_createElement
) and then document that restriction instead.The text was updated successfully, but these errors were encountered: