-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
[WIP] TypeScript support in REPL #1169
Conversation
@kitsonk PTAL any feedback would be much appreciated |
|
I wonder if the meat of this should move to vm.ts similar to node. https://nodejs.org/api/vm.html |
I've got basic compilation working, now is time for imports 👍 EDIT: ATM I'm not able to import any local module because in |
@@ -405,6 +405,7 @@ export class DenoCompiler | |||
assert( | |||
mediaType === MediaType.TypeScript || mediaType === MediaType.JavaScript | |||
); | |||
console.log("pre emit output"); |
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.
before shipping, these should be util's log (hidden behind debug flag).
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.
Of course, just needed some guidance during debugging.
Is there a way to tease apart the compile and eval steps? I think that will enable a fix for #1174 (as well as potentially being cleaner). |
@hayd yes, that's what we're aiming for. Deno compiler will return compiled JS code and it will be up to REPL to execute it. |
Is this waiting on #1136? |
Actually I think we need to wait for #1190 which I am working on at the moment, but it is fairly complex. Once we have that, we can create a better incremental compiler too as well. |
Closing old PRs. I'm still not ready to address TS in the REPL - but now that native ES modules are landed we're much closer. Let's talk about it in a few weeks. |
Ref #1158
This is initial pass at implementing TypeScript support in REPL. It's quite complex task and we're aiming for MVP with this PR.
There are a few PR that might need to land before this one including:
#1136 #1165
cc: @kitsonk @hayd @ry