Skip to content

Adding TypeScript support #1123

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

Closed
khwerhahn opened this issue Aug 2, 2015 · 6 comments
Closed

Adding TypeScript support #1123

khwerhahn opened this issue Aug 2, 2015 · 6 comments

Comments

@khwerhahn
Copy link

It would be nice to see TypeScript included, adding the next step after adding babel.

How should this be implemented into this project?

I would suggest a grunt task (grunt-typescript) that looks for any .ts files and creates a .js in the same directory. This must happen before any other grunt tasks.

@Awk34
Copy link
Member

Awk34 commented Aug 4, 2015

It would be implemented in the same way that the other transpilation works: source files are transpiled to the .tmp directory.

@Awk34 Awk34 added this to the 3.1.0 milestone Aug 16, 2015
@Awk34 Awk34 self-assigned this Dec 16, 2015
@khwerhahn
Copy link
Author

Hi, I'm trying to get it to work... without success. Idea: Convert all .ts files to es6 and then let babel do the rest. This way, one can get the benefit of both.

@Awk34
Copy link
Member

Awk34 commented Dec 19, 2015

@khwerhahn take a look at this PR: #1508

@dolanmiu
Copy link

dolanmiu commented Jan 6, 2016

@khwerhahn why not write Typescript then specify the --target in typescript compiler?

That way.. you can write Javascript in ES3, ES5 or ES6 if you wish

Writing Typescript then setting --target to ES5 does a similar job to Babel (correct me if I'm wrong)

I feel writing Typescript, compiling it into ES6, then using Babel to convert it back down to ES5 to have too many steps when you can just do it in one.

@khwerhahn
Copy link
Author

Babbel is apparently a bit ahead feature wise. But you're right, we should only use TS. TS will get developed even faster with growing interest and support.

@Awk34
Copy link
Member

Awk34 commented Jan 6, 2016

Has been added to 3.3.0-beta.0

@Awk34 Awk34 closed this as completed Jan 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants