Skip to content

Support top-level await in SystemJS modules #32793

Description

@rbuckton

Top-level await

console.log('sync');
await new Promise(resolve => setTimeout(resolve));
console.log('async');

->

System.register([], function (exports, context) {
  return {
    setters: [],
    execute: async function () {
      console.log('sync');
      await new Promise(resolve => setTimeout(resolve));
      console.log('async');
    }
  };
});

Where in dependency graphs, SystemJS supports variant B of the top-level await proposal.

Originally posted by Guy Bedford (@guybedford) in #26606

Activity

  1. ExE-Boss commented on Jan 4, 2020

    @ExE-Boss
    Contributor

    This can now be closed.

  2. rbuckton commented on Jan 6, 2020

    @rbuckton
    ContributorAuthor

    Fixed in #35813

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions