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

Generator asterisk not preserved in the babel plugin #5564

Closed
wcandillon opened this issue Jan 9, 2024 · 2 comments · Fixed by #5565
Closed

Generator asterisk not preserved in the babel plugin #5564

wcandillon opened this issue Jan 9, 2024 · 2 comments · Fixed by #5565
Labels
Missing repro This issue need minimum repro scenario Platform: Android This issue is specific to Android Platform: iOS This issue is specific to iOS

Comments

@wcandillon
Copy link
Contributor

wcandillon commented Jan 9, 2024

Description

The following:

function* simpleGenerator() {
  "worklet";
  yield "Hello";
  yield "World";
}

generates to:

function simpleGenerator() {
  yield "Hello";
  yield "World";
}

which is invalid

Steps to reproduce

simply add the following function to your reanimated project:

function* simpleGenerator() {
  "worklet";
  yield "Hello";
  yield "World";
}

Snack or a link to a repository

I recommend the try the steps above

Reanimated version

latest

React Native version

latest

Platforms

Android, iOS

JavaScript runtime

Hermes

Workflow

None

Architecture

None

Build type

None

Device

None

Device model

No response

Acknowledgements

Yes

@github-actions github-actions bot added Platform: Android This issue is specific to Android Platform: iOS This issue is specific to iOS labels Jan 9, 2024
Copy link

github-actions bot commented Jan 9, 2024

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

@github-actions github-actions bot added the Missing repro This issue need minimum repro scenario label Jan 9, 2024
wcandillon added a commit to wcandillon/react-native-reanimated that referenced this issue Jan 9, 2024
@wcandillon
Copy link
Contributor Author

wcandillon commented Jan 9, 2024

#5565 adds full generator support in worklets.

github-merge-queue bot pushed a commit that referenced this issue Jan 11, 2024
fixes #5564

---------

Co-authored-by: Tomasz Żelawski <tomasz.zelawski@swmansion.com>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing repro This issue need minimum repro scenario Platform: Android This issue is specific to Android Platform: iOS This issue is specific to iOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant