@@ -396,9 +396,6 @@ impl EsmBindgen {
396396 maybe_quote_member( specifier)
397397 ) ;
398398 for ( external_name, local_name) in bound_external_names {
399- // For imports that are functions, ensure that they are noted as host provided
400- uwriteln ! ( output, "{local_name}._isHostProvided = true;" ) ;
401-
402399 uwriteln ! (
403400 output,
404401 r#"
@@ -409,6 +406,9 @@ impl EsmBindgen {
409406 }}
410407 "# ,
411408 ) ;
409+
410+ // For imports that are functions, ensure that they are noted as host provided
411+ uwriteln ! ( output, "{local_name}._isHostProvided = true;" ) ;
412412 }
413413 } else if let Some ( idl_binding) = idl_binding {
414414 uwrite ! (
@@ -480,9 +480,6 @@ impl EsmBindgen {
480480
481481 // Process all external host-provided imports
482482 for ( member_name, local_name) in generated_member_names {
483- // For imports that are functions, ensure that they are noted as host provided
484- uwriteln ! ( output, "{local_name}._isHostProvided = true;" ) ;
485-
486483 // Ensure that the imports we destructured were defined
487484 // (if they were not, the user is likely missing an import @ instantiation time)
488485 uwriteln ! (
@@ -495,6 +492,8 @@ impl EsmBindgen {
495492 }}
496493 "# ,
497494 ) ;
495+ // For imports that are functions, ensure that they are noted as host provided
496+ uwriteln ! ( output, "{local_name}._isHostProvided = true;" ) ;
498497 }
499498 }
500499 }
0 commit comments