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.
Opening this PR as a WIP as I work through some design issues - however as of opening this PR, you can run and execute typescript within emacs-ng: Now ready for merge.Major callout- I had to fork deno to get this working in the way I wanted. I added deno as a submodule to make syncing with upline easy. My changes are trivial and we should be able to merge upstream deno easily.
Update 1: Integrating Typescript was actually much easier than I anticipated. I am removing the WIP from this, and calling it ready for review @yyoncho .
Additions:
(eval-js-file)
will evaluate your file as typescript if it has a typescript extension. You can force it to evaluate it as typescript with the arguments("filename" :typescript t)
(eval-js)
has the ability to execute typescript via(eval-js "let x: string = 'f';" :typescript t)
(eval-ts-buffer)
and(eval-ts-region)
, which evaluate their respective domains as typescript.(js-initialize :inspect t)
. Once running, you can open the chrome debugger via chrome://inspect, and connect.lisp.make
functions.What's really exciting about this is we can add a lot of value to our lisp API doing the following as an example:
main.ts
elisp.ts
While we manually have to create the type definitions, it would allow us to have type safety in dealing with elisp types. typescript has a very powerful type system that can handle lisp's dynamic nature.