-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
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
Stage 3 syntax review #94
Comments
Sorry, this should be stage 3 review not 2. |
why have assertion syntax if you aren't asserting anything? there is |
@ljharb Maybe you've commented them all out. |
Normally I'd be skeptical about allowing empty AssertEntries given the potential for confusion and the minor extra complexity with minimal benefit. In other contexts people probably wouldn't expect an empty assert statement/function to be permitted. But since we allow import { } from "./foo.js" assert { }; // No error. Would be potentially surprising if the first
// set of empty brackets was allowed but not the second. |
@waldemarhorwat pointed out during Stage 3 review that the current syntax does not permit an empty AssertClause. Though an empty AssertClause would not be semantically different from leaving out the AssertClause altogether, it seems reasonable to allow an empty one for consistency's sake because other parts of `import`/`export` syntax permit empty lists. For example it would be strange if the first `{ }` was permitted in the following statement (which is currently the case), but the second was not: `import { } from "./foo.js" assert { }`. Thus this PR edits the spec to allow an AssertClause that has no entries. Closes #94.
I'm going to reopen this for now as I don't think we've gotten a +1 for all review. @dandclark please reclose if that was a mistake |
The revised syntax looks good. |
The proposal reached stage 3, so re-closing |
The syntax seems fine. I have one question: Why can't the list of AssertEntries be empty?
The text was updated successfully, but these errors were encountered: