-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Add flow/typescript toolchain/workflow #2702
Comments
I think it would be better if we used TypeScript since it has more types available and specifically |
+1 for TypeScript. TypeScript seems more widely known (I use TypeScript, have not yet used Flow) and seems to have more momentum. It can also pick up jsdoc... |
I'm ok with either as long as we have an incremental adoption story. For example, if we can start replacing one .js file at a time with one .ts file, then we can incrementally make lots of little PRs to get to where we want to be. So far, the appeal of Flow to me has been that incremental adoption strategy. If we can do that with TS, I'm game |
No problem to have incremental adoption with TS. I let this issue opened to let other people add their inputs. I suggest to definitely choose our type system in 7 days. |
Re-adding my thoughts here from Slack. xterm.js was originally a 5k+ line file and separating it out into different files was one of the main reasons to use TS. I incrementally pulled modules out into their own files while converting, you can check what these sort of PRs look like with the linked PRs on xtermjs/xterm.js#335, though it will certainly be easier with Hyper as you already use a newer style of JS. |
I'm a user of both TypeScript and Flow. For what it's worth, the With that said, TypeScript is definitely in the lead when it comes to tooling, community size, and developer support. The Flow team seems to not have too much time to deal with GitHub issues unfortunately, so the support you get from the repo will mainly be from Flow users rather than the Flow team itself: I haven't been using TypeScript that long, so please correct me if I'm inaccurate about anything, but here is just what I've noticed after having used both: Pros of Flow:
Pros of TypeScript:
With all that said, I prefer Flow, but I think TypeScript might be a better choice due to the amount of libdefs/community available. However, I don't really know much about Also worth checking out: Why Reddit Chose TypeScript. That article seems to say the same thing – they preferred Flow's type-checking and simpler setup, but they went with TypeScript due to its ecosystem. |
As a side note, I submitted a PR to Just so that it isn't the deciding factor. Either way, I'd also be happy to help out if I can in the migration. |
@saadq this is a little different; the xterm.js API changes pretty much every month and it's source of truth is the TS declaration file shipped with the module. It also appears your editor would lose all the jsdoc info that goes with it when using https://github.com/flowtype/flow-typed/pull/2017/files#diff-160b1966f9630834a6d6fc0154b529d0? |
Adding the comments to it would be trivial, but yes the fact that the TS typings is provided by xterm itself is definitely a bonus. |
PR: #2717 |
Hi, I have opened a pull request #3816 adding TypeScript support. |
we're settled for TypeScript now, contributions welcome for porting parts over! :) |
We really want to add flow or TypeScript in our project.
First step is to add it to our dev workflow: add dependencies, linter compatibility, automatically run before push...
Please help us to have some benefits of typed system.
The text was updated successfully, but these errors were encountered: