From 7d80da4dc53da7541870958918be7899db916708 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Wed, 27 Jan 2021 06:01:50 -0500 Subject: [PATCH] fixup! doc: use top-level await syntax in vm.md Co-authored-by: Darshan Sen --- doc/api/vm.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/api/vm.md b/doc/api/vm.md index 493969e4eae453..5d91cf90bd0fef 100644 --- a/doc/api/vm.md +++ b/doc/api/vm.md @@ -458,10 +458,10 @@ const bar = new vm.SourceTextModule(` async function linker(specifier, referencingModule) { if (specifier === 'foo') { return new vm.SourceTextModule(` - // The "secret" variable refers to the global variable we added to - // "contextifiedObject" when creating the context. - export default secret; - `, { context: referencingModule.context }); + // The "secret" variable refers to the global variable we added to + // "contextifiedObject" when creating the context. + export default secret; + `, { context: referencingModule.context }); // Using `contextifiedObject` instead of `referencingModule.context` // here would work as well. @@ -686,7 +686,7 @@ const module = new vm.SourceTextModule( meta.prop = {}; } }); - // Since module has no dependencies, the linker function will never be called. +// Since module has no dependencies, the linker function will never be called. await module.link(() => {}); await module.evaluate();