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

Using typeof in REPL results in undefined output #327

Open
2 tasks
coreyward opened this issue Sep 27, 2023 · 1 comment
Open
2 tasks

Using typeof in REPL results in undefined output #327

coreyward opened this issue Sep 27, 2023 · 1 comment
Labels
blocked bug Something isn't working REPL

Comments

@coreyward
Copy link

Problem

I noticed that when using the REPL (yarn tsx), most expressions with typeof result in the output line being undefined. If it's in a ternary it seems to be okay, though.

Screenshot 2023-09-27 at 12 22 31 PM

Expected behavior

I expected this to match the behavior of the Node REPL, outputting the resultant value of the expression.

Minimal reproduction URL

https://github.com/esbuild-kit/tsx/assets/81224/eacf8fc5-8b7b-4085-b2b9-79a3b6c02d23

Version

v3.13.0

Node.js version

v18.16.1

Package manager

yarn

Operating system

macOS

Contributions

  • I plan to open a pull request for this issue
  • I plan to make a financial contribution to this project
@privatenumber
Copy link
Owner

This is blocked by evanw/esbuild#3502, but we may be able to hack around this by wrapping it in a IIFE:
https://esbuild.github.io/try/#dAAwLjE5LjcAACgoKSA9PiB0eXBlb2YgMSkoKQ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked bug Something isn't working REPL
Projects
None yet
Development

No branches or pull requests

2 participants