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

Implementation in TypeScript #8

Open
7 of 11 tasks
Jack-Works opened this issue Jun 21, 2020 · 1 comment
Open
7 of 11 tasks

Implementation in TypeScript #8

Jack-Works opened this issue Jun 21, 2020 · 1 comment

Comments

@Jack-Works
Copy link
Member

Jack-Works commented Jun 21, 2020

I did an implementation for this proposal just for fun.
https://github.com/Jack-Works/TypeScript/tree/await.ops

  • Syntax: Basic support
  • Type: Basic support
  • Transpile: Downlevel to ES2020
  • Type: Support concrete tuple type
  • Type: Check if Promise.{*} exists
  • Syntax: Require a space after the operator? (Current impl await.all[array] is valid)
  • Service: Auto complete after await.
  • Service: Syntax highlight
  • Service: Refactor suggestion
  • Service: Hover quickinfo?
  • Type: Unique type error message

Screenshots:

image

In TypeScript, Promise.all has 10 generic signatures. If the array has more than 10 items in it, it will fail. The new syntax does not have this limitation.

image

Downgraded to ES2020, they are the same.

image

Support iterables

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant