-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Create a src.js with the following.
let console = 1;node src.js runs without error because function-level shadowing of globals is permitted. That program would break with SyntaxError: Identifier 'require' has already been declared if you replace console with require.
lya breaks with the the same error for console due to its Module.wrap override, regardless if it uses var or let as a variable declarator. This is because it injects known global identifiers into the same module function's scope.
Is there a note somewhere that tells users that they cannot shadow any global identifiers used by Lya in this way?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels