Skip to content
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

📎 Add support for the defer attribute in import statements #4215

Open
denbezrukov opened this issue Oct 8, 2024 · 5 comments · Fixed by #4301
Open

📎 Add support for the defer attribute in import statements #4215

denbezrukov opened this issue Oct 8, 2024 · 5 comments · Fixed by #4301
Assignees
Labels
A-Parser Area: parser good first issue Good for newcomers L-JavaScript Language: JavaScript and super languages

Comments

@denbezrukov
Copy link
Contributor

Description

The TC39 "Deferred Import Evaluation" proposal allows deferring the execution of imported modules until their properties are accessed. This optimizes performance by loading modules without executing them immediately. The syntax is:

import defer * as myModule from "my-module";

https://github.com/tc39/proposal-defer-import-eval/?tab=readme-ov-file

@denbezrukov denbezrukov added good first issue Good for newcomers A-Parser Area: parser L-JavaScript Language: JavaScript and super languages labels Oct 8, 2024
@ematipico ematipico reopened this Oct 15, 2024
@ematipico
Copy link
Member

ematipico commented Oct 15, 2024

Re-opening because there's still something missing.

For example, we don't know yet if

import type defer * as something from "foo"

Is correct or not, and we should at least test the case

@Conaclos
Copy link
Member

Conaclos commented Oct 15, 2024

I don't think it makes sense to combine defer with type...

@ah-yu ah-yu assigned ah-yu and unassigned ah-yu Oct 16, 2024
@fireairforce
Copy link
Member

@ah-yu so any progress on it? maybe i can make this complete again?

@ah-yu
Copy link
Contributor

ah-yu commented Nov 8, 2024

Hi @fireairforce I am not working on it since the previous PR was reverted, the regression no longer exsits. Feel free to take up this issue again if you're interested.

@fireairforce
Copy link
Member

ok, i will finish this pr this weekend~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Parser Area: parser good first issue Good for newcomers L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants