| ▲ | mcintyre1994 9 hours ago | |
> JSX/TSX, despite what React people might want you to believe, are not part of the language. I think you misunderstood this. tsx in this context is/was a way to run typescript files locally without doing tsc yourself first, ie make them run like a script. You can just use Node now, but for a long time it couldn’t natively run typescript files. The only limitation I run into using Node natively is you need to do import types as type imports, which I doubt would be an issue in practice for agents. | ||
| ▲ | Tade0 8 hours ago | parent [-] | |
Yes, thank you for pointing that out. Forgot that there's a another thing named "tsx" out there. I wouldn't call it running TS natively - what they're doing is either using an external tool, or just stripping types, so several things, like most notably enums, don't work by default. I mean, that's more than enough for my use cases and I'm happy that the feature exists, but I don't think we'll ever see a native TypeScript engine. Would have been cool, though, considering JS engines define their own internal types anyway. | ||