Skip to main content

js_ts_imports

Function js_ts_imports 

Source
pub fn js_ts_imports(file: FileId, tree: &Tree, src: &[u8]) -> Vec<ImportSpec>
Expand description

Shared ES-module import parser used by both the JavaScript and TypeScript adapters. Handles: import x from "y" — default import import { a, b as c } from "z" — named imports + alias import * as ns from "n" — namespace import