Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support top-level await in SystemJS modules #32793

Closed
rbuckton opened this issue Aug 9, 2019 · 2 comments
Closed

Support top-level await in SystemJS modules #32793

rbuckton opened this issue Aug 9, 2019 · 2 comments
Assignees
Labels
Experience Enhancement Noncontroversial enhancements Suggestion An idea for TypeScript

Comments

@rbuckton
Copy link
Member

rbuckton commented Aug 9, 2019

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 @guybedford in #26606

@rbuckton rbuckton self-assigned this Aug 9, 2019
@rbuckton rbuckton added this to the TypeScript 3.7.0 milestone Aug 9, 2019
@RyanCavanaugh RyanCavanaugh added Experience Enhancement Noncontroversial enhancements Suggestion An idea for TypeScript labels Aug 14, 2019
@ExE-Boss
Copy link
Contributor

ExE-Boss commented Jan 4, 2020

This can now be closed.

@rbuckton
Copy link
Member Author

rbuckton commented Jan 6, 2020

Fixed in #35813

@rbuckton rbuckton closed this as completed Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Experience Enhancement Noncontroversial enhancements Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

3 participants