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

Errors on some class methods #3

Open
turadg opened this issue Sep 17, 2018 · 1 comment
Open

Errors on some class methods #3

turadg opened this issue Sep 17, 2018 · 1 comment
Labels
bug Something isn't working could not reproduce

Comments

@turadg
Copy link

turadg commented Sep 17, 2018

approx diff,

class Measure {
-  _saveEnrollment(payload: { testName: string, variation: string }) {
…
+  _saveEnrollment async function(payload: { testName: string, variation: string }) {
}

Should be

+  async _saveEnrollment(payload: { testName: string, variation: string }) {
@sgilroy
Copy link
Owner

sgilroy commented Sep 23, 2018

@turadg Note that there isn't any official support for TypeScript yet with this plugin.

I was not able to reproduce when adapting one of the existing unit tests (below) to a class. Please provide a complete example (preferably with JavaScript, not TypeScript) that reproduces the problem.

class User {
  a() {
    return b().then(c => {
      return c.d;
    });
  }
}

is transformed as expected to

class User {
  async a() {
    const c = await b();
    return c.d;
  }
}

@sgilroy sgilroy added bug Something isn't working could not reproduce labels Sep 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working could not reproduce
Projects
None yet
Development

No branches or pull requests

2 participants