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

REPL import statement support #213

Closed
loynoir opened this issue Mar 28, 2023 · 7 comments
Closed

REPL import statement support #213

loynoir opened this issue Mar 28, 2023 · 7 comments
Labels
enhancement New feature or request outdated

Comments

@loynoir
Copy link

loynoir commented Mar 28, 2023

Feature request

REPL import statement support

Why?

  • deno REPL support import statement
  • node typescript REPL support typescript import statement would be convenient and elegant.

Alternatives

Rewrite

import {foo} from "bar"

To

var {foo} = await import("bar")

Additional context

#52

@privatenumber
Copy link
Owner

tsx is not interested in Deno compatibility. tsx is interested in adding TypeScript support in Node, but this has nothing to do with it.

While I agree this would be a nice feature, this should be a feature request for Node.js.

@coreyward
Copy link

I'm not sure if alignment with ts-node is at all desired, but this is something that it supports with the right configuration.

@privatenumber
Copy link
Owner

Why dont you open a feature request with Node?

@coreyward
Copy link

@privatenumber Just sharing some context. No need to get upset at me.

@privatenumber
Copy link
Owner

privatenumber commented Sep 26, 2023

Im not upset. Genuine question.

I really think this feature request should be filed with Node since it's an obvious DX improvement.

@loynoir
Copy link
Author

loynoir commented Sep 26, 2023

I did already filed with Node.

nodejs/node#47278

But think in another way, tsx do AST transform, while node consider not.

So, maybe easier to implement such feature during AST transform.

@privatenumber
Copy link
Owner

That's cool, thanks for sharing!

However, tsx is a TypeScript & ESM enhancement, and not a place to just add arbitrary Node improvements.

I would keep pushing it in Node as that's where it belongs. Try tagging stake holders and get more people involved.

Alternatively, you can start a separate project to enhance Node.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request outdated
Projects
None yet
Development

No branches or pull requests

3 participants