fix(javascript): preserve proven interop result projections

This commit is contained in:
morluto
2026-10-12 00:10:02 +08:00
parent 6b460683d7
commit 3d1d5b56b2
4 changed files with 141 additions and 14 deletions
+6 -2
View File
@@ -327,8 +327,12 @@ Electron API identity follows proven lexical module aliases. Namespace interop
also preserves identity when the complete Rolldown helper operations, lexical
roles, live getters, and captured intrinsic origins match, or when a stable
helper simply returns its module parameter. Harmless single-statement control
blocks preserve recognition; added operations still require proof. Recognition
uses structure rather than emitted names; other helper bodies and ambiguous
blocks preserve recognition; added operations still require proof. Literal
member and destructuring projections are retained from proven results.
Omitted or literal node-mode arguments preserve named exports; a module-valued
default projection requires a truthy literal node mode. Computed or extra
arguments remain unresolved.
Recognition uses structure rather than emitted names; other helper bodies and ambiguous
runtime fallbacks remain unresolved. Captured function identities survive later global-property
replacement, including copies through initialized aliases. Reads before an
alias initializer remain unresolved. Visible intrinsic writes before capture or