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

[WIP] Build with TypeScript #1657

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

[WIP] Build with TypeScript #1657

wants to merge 1 commit into from

Conversation

strugee
Copy link
Member

@strugee strugee commented Jun 1, 2018

WIP. Seems to work so far. Open issues to solve:

  • Linting .ts files
  • Making sure the npm package doesn't ship with a bunch of .ts files
  • Dialing up the strictness
  • A watch task or something so you don't have to constantly npm run build

@ghost
Copy link

ghost commented Jun 13, 2018

WTF :/

@Serkan-devel
Copy link

How would it be if one does it with coffescript?

@strugee
Copy link
Member Author

strugee commented Jun 13, 2018

@vxcamiloxv can you elaborate...? Are you upset that TypeScript is from Microsoft?

@Serkan-devel it would be mostly the same as this, but we're not doing CoffeeScript.

@ghost
Copy link

ghost commented Jun 13, 2018

well, yes is a Microsoft technology but more important is no a standard and don't have any advantage, you can use the last standard of JS with babel and have the same result and with TS you will need a big migration (lib/routes/tests etc) and I think should hard migrate a tests or you can keep a mix of JS and TS but I think is not a good idea, I think is easier migrate to es6 and use babel

@strugee
Copy link
Member Author

strugee commented Jun 14, 2018

@vxcamiloxv TypeScript is basically a superset of JavaScript; the TypeScript team actually does a really good job of keeping it compatible with the JS standard. So there wouldn't be that big of a difference.

TypeScript's ES6 support is nice, but isn't the primary reason I want to move to it - the big advantage is that we would get type safety. This would be a huge help and would likely catch a lot of bugs.

@ghost
Copy link

ghost commented Jun 14, 2018

@strugee but it is for type Flow is great a powerful option and is not necessarily a big migration and a eslint plugin in future can help to force that

@strugee
Copy link
Member Author

strugee commented Jun 14, 2018

@vxcamiloxv sure, but for Flow you're still adding nonstandard syntax to JS. Flow + Babel is no more standard than TypeScript. It's still not JavaScript, and migrating to Flow will be just as much work as migrating to TypeScript.

And TypeScript has the advantage of less moving parts. Plus I have heard from friends that TypeScript's type system is slightly better than Flow's, although I don't know the details.

@Serkan-devel
Copy link

Why not use vue.js?

@ghost
Copy link

ghost commented Dec 29, 2018

@Serkan-devel vue.js and typescript are different things, vue.js also can be written with or without TS

@ghost
Copy link

ghost commented Dec 29, 2018

@strugee My major concern with TS is the same problem that has the people with CoffeeScript or similar, it may be something fashionable that will be abandoned

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants