-
Notifications
You must be signed in to change notification settings - Fork 367
Closed
Description
In import(src, { assert: { type: "json" }, somethingElse: true }), only { type: "json" } is the assertions bag. However, ESTree AST for the above code calls { assert: { type: "json" }, somethingElse: true } "assertions". The same happens with import attributes, where only the object stored in the with property is the attributes part.
It's probably too late to change the ESTree shape for import assertions, but maybe we could change it for import attributes by renaming assertions to a more generic options?
extend interface ImportExpression {
options: Expression | null;
}cc @xtuc since you maintain the only existing ESTree-compatible parser for import attributes.
Metadata
Metadata
Assignees
Labels
No labels