You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently this shows the loader is not applied with the error:
[eval]:1
const thing: string = hi; console.log(thing);
^^^^^
SyntaxError: Missing initializer in const declaration
at new Script (node:vm:100:7)
at createScript (node:vm:257:10)
at Object.runInThisContext (node:vm:305:10)
at node:internal/process/execution:81:19
at [eval]-wrapper:6:22
at evalScript (node:internal/process/execution:80:60)
at node:internal/main/eval_string:27:3
Why?
This is a feature used commonly in the node ecosystem for example code and running code snippets.
It can be also be useful for running a script without having to create a file. Right now creating a file is the only way eg related question here about Programmatic usage.
Feature request
Ability to use typescript in using the node
--eval
or-e
feature from node:eg api:
Currently this shows the loader is not applied with the error:
Why?
This is a feature used commonly in the node ecosystem for example code and running code snippets.
It can be also be useful for running a script without having to create a file. Right now creating a file is the only way eg related question here about Programmatic usage.
Alternatives
No response
Additional context
Initial question here https://github.com/esbuild-kit/tsx/discussions/161 where @privatenumber suggests this should be possible.
The text was updated successfully, but these errors were encountered: