We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
esprima.parse(` export let a = '1'; export let a = '2'; `)
Syntax error.
{ "type": "Program", "body": [ { "type": "ExportNamedDeclaration", "declaration": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "a" }, "init": { "type": "Literal", "value": "1", "raw": "'1'" } } ], "kind": "let" }, "specifiers": [], "source": null }, { "type": "ExportNamedDeclaration", "declaration": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "a" }, "init": { "type": "Literal", "value": "2", "raw": "'2'" } } ], "kind": "let" }, "specifiers": [], "source": null } ], "sourceType": "module" }
The spec: https://tc39.es/ecma262/#sec-module-semantics-static-semantics-early-errors
It is a Syntax Error if the ExportedNames of ModuleItemList contains any duplicate entries.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Steps to reproduce
Expected output
Syntax error.
Actual output
Relevant references
The spec: https://tc39.es/ecma262/#sec-module-semantics-static-semantics-early-errors
The text was updated successfully, but these errors were encountered: