pub struct ImportInfo {
pub source: String,
pub imported_name: ImportedName,
pub local_name: String,
pub is_type_only: bool,
pub is_type_only_star: bool,
pub from_style: bool,
pub span: Span,
pub source_span: Span,
}Expand description
An import declaration.
Fields§
§source: StringThe import specifier (e.g., ./utils or react).
imported_name: ImportedNameHow the symbol is imported (named, default, namespace, or side-effect).
local_name: StringThe local binding name in the importing module.
is_type_only: boolWhether this is a type-only import (import type).
is_type_only_star: boolWhether this whole-module import forwards type meanings only.
Set for export type * and export type * as ns inside a
declare module '...' body (issue #2375). Those forms record the same
bindingless whole-module shape the plain ambient star records
(issue #2357), but the star they stand for erases every value meaning,
so the graph credits the target’s star surface in the type namespace
alone. Every other import leaves this false: is_type_only already
decides their namespace on its own.
from_style: boolWhether this import originated from a CSS-context.
span: SpanSource span of the import declaration.
source_span: SpanSpan of the source string literal used by the LSP to highlight the specifier.