Skip to main content

Module external_map

Module external_map 

Source
Expand description

External type mapping: resolve imported types to Rust paths.

When an imported type can’t be resolved by parsing its source file, the external map provides the Rust path to use instead.

§CLI format

--external "node:*=node_sys::*"              # wildcard module mapping
--external "Blob=::web_sys::Blob"            # explicit type mapping
--external "node:buffer=node_buffer_sys"     # specific module mapping

Multiple mappings can be comma-separated or specified with multiple flags.

Structs§

ExternalMap
Maps TypeScript module specifiers and type names to Rust paths.
RustPath
A resolved Rust path for an external type.