File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -630,7 +630,9 @@ var obj = {a: 1, b: {
630630}}
631631// pay attention that this method is asynchronous
632632// it can handle `undefined` and circular reference object
633- const clone = await structuralClone (obj);
633+ (async () => {
634+ const clone = await structuralClone (obj)
635+ })()
634636` ` `
635637
636638# Modularization
Original file line number Diff line number Diff line change @@ -671,7 +671,9 @@ var obj = {a: 1, b: {
671671}}
672672// 注意该方法是异步的
673673// 可以处理 undefined 和循环引用对象
674- const clone = await structuralClone (obj);
674+ (async () => {
675+ const clone = await structuralClone (obj)
676+ })()
675677```
676678
677679# 模块化
Original file line number Diff line number Diff line change @@ -630,7 +630,9 @@ var obj = {a: 1, b: {
630630}}
631631// pay attention that this method is asynchronous
632632// it can handle `undefined` and circular reference object
633- const clone = await structuralClone (obj);
633+ (async () => {
634+ const clone = await structuralClone (obj)
635+ })()
634636` ` `
635637
636638# Modularization
You can’t perform that action at this time.
0 commit comments