ECMAScript TC39 - Import Attributes
The ECMAScript TC39 committee gathered last week in Tokyo and they have analyzed the new language proposals and moved to one of the five maturity stages they have to go through before they are officially adopted in the language this time.
STAGE 0 - Strawman Idea
STAGE 1 - Proposal Concept
STAGE 2 - Draft Specs
STAGE 3 - Candidate Implementation
STAGE 4 - Finished
Today we will see about Import attributes reached STAGE 4 . These add an inline syntax for module import statements to pass one or more information alongside the module specifier.
This will provide some security benefits since it provides some safeguards preventing non-executable modules from running.
In Import and export statements you can define attributes using “with” keyword
You can define the import attributes in the second argument.
Note: These features are not in the standard yet and some of them might never end up being adopted
Subscribe to my newsletter
Read articles from nidhinkumar directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by