-
Notifications
You must be signed in to change notification settings - Fork 142
Added TypeScript support to the code interpreter #91
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
Merged
mishushakov
merged 10 commits into
main
from
support-tsjs-natively-in-code-interpreter-e2b-1315
May 2, 2025
Merged
Added TypeScript support to the code interpreter #91
mishushakov
merged 10 commits into
main
from
support-tsjs-natively-in-code-interpreter-e2b-1315
May 2, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
mishushakov
commented
Apr 25, 2025
- Adds TypeScript support with SWC pre-compilation step
- Bump Node v20
- This does not add: top-level async/await, ES Modules
0div
approved these changes
Apr 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty neat compiler, some questions/considerations:
- it seems like it accepts different module import types and targets most useful ECMAScripts, would it be possible/make sense to make it parameterizable from the SDK request?
- what's the resource footprint of calling this on each code execution? do you have any js vs ts benchmark test results?
- how do compilation errors look like to the end user?
- did you check if there's a way to run
swc
as a server of sorts, similar to how it can watch? that way we do not need to create a process each time?
hey
script: const a: number = 1;
console.log(a)
|
Why not Node.js 22? It's the latest LTS version |
@wong2 some native ijavascript dependencies didn't compile on v22 |
0div
requested changes
Apr 29, 2025
0div
approved these changes
Apr 30, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.