Skip to content

⬅️ Back to Table of Contents

📄 ImportExpression/spec

📊 Analysis Summary

Metric Count
📦 Imports 3
📐 Interfaces 1

📚 Table of Contents

🛠️ File Location:

📂 packages/ast-spec/src/expression/ImportExpression/spec.ts

📦 Imports

Name Source
AST_NODE_TYPES ../../ast-node-types
BaseNode ../../base/BaseNode
Expression ../../unions/Expression

Interfaces

ImportExpression

Interface Code
export interface ImportExpression extends BaseNode {
  type: AST_NODE_TYPES.ImportExpression;
  /**
   * The attributes declared for the dynamic import.
   * @example
   * ```ts
   * import('mod', \{ assert: \{ type: 'json' \} \});
   * ```
   * @deprecated Replaced with {@link `options`}.
   */
  attributes: Expression | null;
  /**
   * The options bag declared for the dynamic import.
   * @example
   * ```ts
   * import('mod', \{ assert: \{ type: 'json' \} \});
   * ```
   */
  options: Expression | null;
  /**
   * The phase modifier of the import.
   * @example
   * ```ts
   * import('mod'); // phase: null
   * import.defer('mod'); // phase: defer
   * ```
   */
  phase: 'defer' | null;
  source: Expression;
}

Properties

Name Type Optional Description
type AST_NODE_TYPES.ImportExpression not shown
attributes Expression \| null not shown
options Expression \| null not shown
phase 'defer' \| null not shown
source Expression not shown

Generated by Syntax Scribe