Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 1.14 KB

File metadata and controls

39 lines (27 loc) · 1.14 KB

This document specifies the extensions to the ESTree ES6 AST types to support the "export-default-from" proposal.

Modules

ExportNamedDeclaration

extend interface ExportNamedDeclaration {
    specifiers: [ ExportSpecifier | ExportDefaultSpecifier ];
}

Extends the ExportNamedDeclaration, e.g., export {foo} from "mod"; to allow a new type of specifier: ExportDefaultSpecifier.

Note: When source is null, having specifiers include ExportDefaultSpecifier results in an invalid state.

Note: Having specifiers include more than one ExportDefaultSpecifier results in an invalid state.

ExportDefaultSpecifier

interface ExportDefaultSpecifier <: Node {
    type: "ExportDefaultSpecifier";
    exported: Identifier;
}

An exported binding foo in export foo from "mod";. The "exported" field refers to the name exported in this module. That name is bound to the "default" export from the source of the parent ExportNamedDeclaration.