Skip to main content

Command Palette

Search for a command to run...

ECMAScript TC39 - Import Attributes

Updated
1 min read
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

More from this blog

Nidhin's blog

168 posts

✨Crafting Code with a Smile for 8 Years:) Merging the Formal Dance of Angular, the Playful Rhythms of React, and the Next-level Moves of Next.js 🚀