Skip to content

Commit ff3f7ec

Browse files
authored
fix: virtual references remained (#259)
1 parent d8d423f commit ff3f7ec

File tree

4 files changed

+14371
-1
lines changed

4 files changed

+14371
-1
lines changed

src/context/script-let.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,6 @@ export class ScriptLetContext {
516516
callback!(fn.params, result);
517517
for (let index = 0; index < fn.params.length; index++) {
518518
const p = fn.params[index];
519-
(p as any).parent = parents![index];
520519
if (this.ctx.isTypeScript()) {
521520
const typeAnnotation = (p as any).typeAnnotation;
522521
delete (p as any).typeAnnotation;
@@ -529,6 +528,7 @@ export class ScriptLetContext {
529528

530529
removeAllScopeAndVariableAndReference(typeAnnotation, result);
531530
}
531+
(p as any).parent = parents![index];
532532
}
533533

534534
// Process for scope
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<script lang="ts">
2+
export let message: string|undefined;
3+
export const formatMessage = async (message: string): Promise<string> => {
4+
return new Promise(resolve => {
5+
resolve(message);
6+
});
7+
};
8+
</script>
9+
10+
{#if !message}
11+
No message
12+
{:else}
13+
{#await formatMessage(message)}
14+
Loading...
15+
{:then result}
16+
{result}
17+
{/await}
18+
{/if}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy