Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upSemantics of ResolveExport for default exports #601
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
|
Agreed, |
GeorgNeis
referenced this issue
Jun 9, 2016
Merged
ResolveExport: return null instead of throwing #606
bterlson
closed this
in
0394e96
Jun 9, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
GeorgNeis commentedJun 7, 2016
If a module M does not provide a default export, then M.ResolveExport("default") throws a SyntaxError (see step 6 in 15.2.1.16.3). For any other name that cannot be found, ResolveExport returns null instead.
Throwing a SyntaxError seems wrong, also because ResolveExport is being described as side-effect free elsewhere in the spec.