pub struct DynamicImportInfo {
pub source: String,
pub span: Span,
pub destructured_names: Vec<String>,
pub local_name: Option<String>,
pub is_speculative: bool,
pub value_escapes: bool,
}Expand description
A dynamic import() call.
Fields§
§source: StringThe import specifier.
span: SpanSource span of the import() expression.
destructured_names: Vec<String>Names destructured from the dynamic import result.
Non-empty means const { a, b } = await import(...) -> Named imports.
Empty means simple import(...) or const x = await import(...) -> Namespace.
local_name: Option<String>The local variable name for const x = await import(...).
Used for namespace import narrowing via member access tracking.
is_speculative: boolTrue when this dynamic import was synthesised by fallow rather than appearing in user source.
value_escapes: boolTrue when the value of an import() without a binding escapes, for
example as a return value, a call argument, or an array element.
The consumer can then read any export, so the edge credits the whole
module namespace. False for a discarded import() statement, which
only loads the module.