Direct link: https://github.com/Microsoft/TypeScript-React-Starter
Here's the package that adds the TS functionality to create-react-app FYI: https://github.com/wmonk/create-react-app-typescript
No, because TypeScript is a transpiler and Flow is a linter. You don't have to convert your codebase with Flow -- you can just run it on existing JS.
You can use TS on a JS codebase as well (with the --allowJs option), or you can leave JS files to a separate build step if you don't want type inference for them. I have used both approaches in the past.
This is absolutely untrue. Have you used Flow? It runs as a completely separate process -- you're literally running Flow as a command which typechecks/lints your code. It does not do any transpilation or modify your code in any way. The only caveat is the Flow type annotations which are A. optional and B. removed at compile time without doing any typechecking. Try it some time -- you can run Flow on existing JS code without modifying either your code or your build process in any way. It'll probably even find some bugs without you needing to add additional type information. This is fundamentally different from Typescript which goes hand-in-hand with a fully-featured transpiler.
To be clear, I use TypeScript and like it a lot -- but there seems to be a persistent perception that Flow and TS are two sides of the same coin. They are not and there are certainly some use cases where Flow fits better.
I think we're saying the same thing. By "linter" I mean a program that only checks for stylistic and defined/undefined errors. To me, anything beyond that is a typechecker. Whereas TS bundles a typechecker with a transpiler, Flow keeps the 2 separate (you still need both if your program is written using Flow syntax).
You are using "linter" more broadly, which may be fair as well.
Additionally, both TS and Flow can be used on JS files with zero modification.
They are supporting flow but not TS.
Maybe writing "push" was a bit of an over statement from my side but for how well typescript plays with react and JSX and how much more popular it is compared to flow it should be either supported by them or flow shouldn't be. Currently they are discriminating in favor of flow. Which I mean they have 100% the right to do, its their product but as an end user I simply want to express my desire in that feature being first class.
https://github.com/babel/babylon/issues/320, https://github.com/babel/babylon/issues/523
They should support a niche third party competitor tool on their freely available and FOSS tooling?
wrong. typescript is vastly more popular than flow.
>competitor tool
hey if they got that thinking, its fine. its their product but from my user perspective I just want to let them know that I could really use some first class TS support.
Irrelevant, as both are still niche.
- TypeScript: 4,745,783 downloads in the last month
- Flow: 889,612 downloads in the last month