digitalmars.D.learn - Typescript with vibe.d
- GreatSam4sure (3/3) Mar 09 2020 I want to know if it is possible to use typescript with the
- Panke (2/5) Mar 09 2020 What do you want to do?
- Steven Schveighoffer (6/9) Mar 09 2020 My understanding is that Typescript needs to be compiled to javascript.
- GreatSam4sure (7/16) Mar 09 2020 I am working on a web app using a vibe.d but I prefer typescript
- Steven Schveighoffer (11/30) Mar 09 2020 You can use it, but you have to compile it yourself. Vibe.d does nothing...
- GreatSam4sure (3/16) Mar 09 2020 Thanks, that is what I want to know
- Jacob Carlborg (6/9) Mar 10 2020 There's a Diet filter for TypeScript here [1], but it hasn't been
- GreatSam4sure (5/14) Mar 11 2020 Thanks, it will be really nice to enable the use of typescript by
I want to know if it is possible to use typescript with the vibe.d since typescript is a superset of javascript. I will appreciate any example if it is possible
Mar 09 2020
On Monday, 9 March 2020 at 09:42:16 UTC, GreatSam4sure wrote:I want to know if it is possible to use typescript with the vibe.d since typescript is a superset of javascript. I will appreciate any example if it is possibleWhat do you want to do?
Mar 09 2020
On 3/9/20 5:42 AM, GreatSam4sure wrote:I want to know if it is possible to use typescript with the vibe.d since typescript is a superset of javascript. I will appreciate any example if it is possibleMy understanding is that Typescript needs to be compiled to javascript. You can't serve typescript directly to a browser. So as long as you are doing this in a separate file, vibe.d can serve up the javascript files just fine. -Steve
Mar 09 2020
On Monday, 9 March 2020 at 15:11:48 UTC, Steven Schveighoffer wrote:On 3/9/20 5:42 AM, GreatSam4sure wrote:I am working on a web app using a vibe.d but I prefer typescript to javascript. So I want to use typescript. My question is that can I use typescript instead of javascript since it must be compiled to javascript? Does the vibe.d framework compile typescript to javascript?I want to know if it is possible to use typescript with the vibe.d since typescript is a superset of javascript. I will appreciate any example if it is possibleMy understanding is that Typescript needs to be compiled to javascript. You can't serve typescript directly to a browser. So as long as you are doing this in a separate file, vibe.d can serve up the javascript files just fine. -Steve
Mar 09 2020
On 3/9/20 1:23 PM, GreatSam4sure wrote:On Monday, 9 March 2020 at 15:11:48 UTC, Steven Schveighoffer wrote:You can use it, but you have to compile it yourself. Vibe.d does nothing with the javascript except serve it to the browser. It has no restrictions on what files can be sent, but does not convert anything for you.On 3/9/20 5:42 AM, GreatSam4sure wrote:I am working on a web app using a vibe.d but I prefer typescript to javascript. So I want to use typescript. My question is that can I use typescript instead of javascript since it must be compiled to javascript?I want to know if it is possible to use typescript with the vibe.d since typescript is a superset of javascript. I will appreciate any example if it is possibleMy understanding is that Typescript needs to be compiled to javascript. You can't serve typescript directly to a browser. So as long as you are doing this in a separate file, vibe.d can serve up the javascript files just fine. -SteveDoes the vibe.d framework compile typescript to javascript?No. This means that if you wanted to use, for instance, a diet template to generate typescript, this would not work. My recommendation in that case is to generate javascript data using diet templates, and use it from a Typescript file that is pre-compiled before being served via vibe.d. -Steve
Mar 09 2020
On Monday, 9 March 2020 at 17:46:42 UTC, Steven Schveighoffer wrote:On 3/9/20 1:23 PM, GreatSam4sure wrote:Thanks, that is what I want to know[...]You can use it, but you have to compile it yourself. Vibe.d does nothing with the javascript except serve it to the browser. It has no restrictions on what files can be sent, but does not convert anything for you.[...]No. This means that if you wanted to use, for instance, a diet template to generate typescript, this would not work. My recommendation in that case is to generate javascript data using diet templates, and use it from a Typescript file that is pre-compiled before being served via vibe.d. -Steve
Mar 09 2020
On Monday, 9 March 2020 at 09:42:16 UTC, GreatSam4sure wrote:I want to know if it is possible to use typescript with the vibe.d since typescript is a superset of javascript. I will appreciate any example if it is possibleThere's a Diet filter for TypeScript here [1], but it hasn't been updated since 2015. [1] https://code.dlang.org/packages/diet-typescript -- /Jacob Carlborg
Mar 10 2020
On Tuesday, 10 March 2020 at 08:55:56 UTC, Jacob Carlborg wrote:On Monday, 9 March 2020 at 09:42:16 UTC, GreatSam4sure wrote:Thanks, it will be really nice to enable the use of typescript by default since it is type-safe. I will appreciate this feature of it can be added. I personally don't like dynamic languages due to lack of declaring a type for every variableI want to know if it is possible to use typescript with the vibe.d since typescript is a superset of javascript. I will appreciate any example if it is possibleThere's a Diet filter for TypeScript here [1], but it hasn't been updated since 2015. [1] https://code.dlang.org/packages/diet-typescript -- /Jacob Carlborg
Mar 11 2020