fix(compiler): avoid deferred helper name collisions
This commit is contained in:
1 parent
a90d3683d3
commit
ca8aabf640
2 files changed
+18
-2
No files matched your search
@@ -270,8 +270,8 @@ function functionEntry(
|
||||
.join("\n");
|
||||
const commitBinding = stateNames.length
|
||||
? `const __wrnexusCommit = () => { ${copyBack} };
|
||||
${!parameterNames.has("commit") && !declaredLocals.has("commit") ? "const commit = __wrnexusCommit;" : ""}
|
||||
${!parameterNames.has("setTimeout") && !declaredLocals.has("setTimeout") ? `const setTimeout = (callback, delay, ...args) => globalThis.setTimeout(() => {
|
||||
${!parameterNames.has("commit") && !declaredLocals.has("commit") && !functionAliases.includes("commit") ? "const commit = __wrnexusCommit;" : ""}
|
||||
${!parameterNames.has("setTimeout") && !declaredLocals.has("setTimeout") && !functionAliases.includes("setTimeout") ? `const setTimeout = (callback, delay, ...args) => globalThis.setTimeout(() => {
|
||||
try { return callback(...args); } finally { __wrnexusCommit(); }
|
||||
}, delay);` : ""}`
|
||||
: "";
|
||||
|
||||
Reference in new issue
Block a user