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

feat: add transpile_owned and transpile_owned_with_fallback #237

Merged
merged 4 commits into from
Apr 12, 2024

Conversation

dsherret
Copy link
Member

@dsherret dsherret commented Apr 11, 2024

As suggested by @mmastrac

Built this off #236 so waiting on #236.

@@ -146,41 +163,115 @@ impl TranspileOptions {

impl ParsedSource {
/// Transform a TypeScript file into a JavaScript file.
///
/// Note: This will clone the program if it's shared, which
/// might be expensive.
pub fn transpile(
Copy link
Member Author

@dsherret dsherret Apr 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably get rid of this in the future and make it internal. I just wanted to do this in a backwards compatible way for the time being (that said, I also wrote this so we can manually implement transpile_owned_with_fallback and have logging for that, but perhaps we could add logging in here for when it transpiles a non-exclusive ParsedSource)

@dsherret dsherret marked this pull request as ready for review April 12, 2024 21:17
@dsherret dsherret changed the title feat: add transpile_owned and transpile_owned_with_callback feat: add transpile_owned and transpile_owned_with_fallback Apr 12, 2024
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, cool to have these options to use more efficient way for owned data.

@dsherret dsherret merged commit ddf1ddc into denoland:main Apr 12, 2024
2 checks passed
@dsherret dsherret deleted the feat_transpile_owned branch April 12, 2024 22:09
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

Successfully merging this pull request may close these issues.

2 participants