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

About native support for typescript!! #24101

Closed
akdotio opened this issue Nov 5, 2018 · 14 comments
Closed

About native support for typescript!! #24101

akdotio opened this issue Nov 5, 2018 · 14 comments
Labels
feature request Issues that request new features to be added to Node.js.

Comments

@akdotio
Copy link

akdotio commented Nov 5, 2018

Is your feature request related to a problem? Please describe.
No.

Describe the solution you'd like
Are you planing to support typescript natively? something like node main.ts
I know that it's possible to execute basic .ts files with node but es6 and es7 features not supported, I also know that it's not related to nodeengine itself it's related to v8 engine but it can be done with node and it's going to be great feature of course.

Describe alternatives you've considered
1- embed the compiling stage in memory at the runtime something like the JITs.
2- add es6 and es7 features support as v8 engine extensions - No compiling at all.

@devsnek
Copy link
Member

devsnek commented Nov 5, 2018

we already support most of es6 and es7. in any case, the magical thing about ts is that you can compile it to js and then use node with it anyway.

@devsnek devsnek added the feature request Issues that request new features to be added to Node.js. label Nov 5, 2018
@devsnek devsnek closed this as completed Nov 5, 2018
@MatthiasKunnen
Copy link

@AhmedMKamal, you should use https://github.com/TypeStrong/ts-node if you want to execute TypeScript without compiling.

@fenixphp
Copy link

It is difficult, but it would be a big step forward for the technology as a whole.

@millsp
Copy link

millsp commented Oct 10, 2019

What about switching the projet to TypeScript so that we can have up-to-date types from the team directly?

@autocorrectoff
Copy link

deno is going to have typescript support out of the box. would be cool if node would also

@trapcodeio
Copy link

This support would not be a bad idea in future.
We need types 😎

@nuts-n-bits
Copy link

we already support most of es6 and es7. in any case, the magical thing about ts is that you can compile it to js and then use node with it anyway.

Did you miss the point because you didn't read the issue or you just dont care to address it lol

@phil-lgr
Copy link

I don’t want to pollute this issue further, but it would be very appreciated if we could have some feedback on ts support from the node core team

I have not seen a nodejs project written in plain JS for years now, I care about node a lot, and imo it would be a huge DX improvement to have ts node and types all coming from the same team

Thank you

@jimmywarting
Copy link

have you asked yourself why Javascript is the only one implemented across browsers?

exposing additional programming languages support to the Web, Deno and NodeJS don't bring any real benefit to anyone other than fans of the current "most awesome" language some years ago that might have been Go, a year or so ago this would have been ruby, before than python, i recall i brief surge in haskell popularity not that long ago as well, Lua has been on the verges for a long time, in one case it was google who tried to ship Dart into chrome -- Now it's typescript. who's to say there won't be a completely different language in vogue in 6 months?), we have a optional static typing proposal on the horizon that could make typescript totally obsolete.

The issue here isn't "can we add support for typescript?" it's "can we expose multiple languages to NodeJS", to the former i say obviously as we already do with require.extension and experimental loader, to the latter I say that we don't want to have native typescript support in NodeJS and maintain it.

...Unless we want to turn NodeJS into the engine that everyone hates because of all its unique "features" that break the open web, a la certain browsers in the late 90s. with ActionScript

CoffeeScript is another example of an emerging client-side scripting language. but you don't see many more project of this now days...

@lindenquan
Copy link

I hope JavaScript can have optional type system, so that we don't need to use TypeScript anymore.

@codemaster101
Copy link

Unsure why this is closed. I think this is one of the most important features to support Nodejs longevity.

@targos
Copy link
Member

targos commented Aug 17, 2022

There are new issues about TS support: #43818, #43816

@lquanx
Copy link

lquanx commented Aug 17, 2022

I will just use deno

@MohammedElMO
Copy link

hi , i wish their is a support for typescript out of the box so that i wouldn't use deno

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issues that request new features to be added to Node.js.
Projects
None yet
Development

No branches or pull requests