Skip to main content

apply_js_ts_default_export_aliases

Function apply_js_ts_default_export_aliases 

Source
pub fn apply_js_ts_default_export_aliases(
    decl_index: &mut DeclIndex,
    tree: &Tree,
    src: &[u8],
    file: FileId,
)
Expand description

Surface ECMAScript export default and CommonJS module.exports = function ... as an additional callable/type binding named default in the exporting module. The original declaration remains indexed by its real local name, so same-file references still resolve while default imports / callable CommonJS requires can target the language-level export name.