jsynowiec | 9 years ago | on: Show HN: Boilerplate for Node.js and TypeScript with Jest tests
jsynowiec's comments
jsynowiec | 9 years ago | on: Show HN: Boilerplate for Node.js and TypeScript with Jest tests
Re 2: I do agree that this is a problem but remember that it's all just a community effort. You can always create your own type definitions or enhance existing ones and share on the DefinitelyTyped repository. Also, most of the time if a type definition is out of date or invalid, you can just create your own partial typedef for a module with only those several methods you are actually using.
Re 3: IMO it's a feature. By using, for e.g. a bluebird library to wrap third party code in a Promise, you are changing the way how your code is interacting with that library by redeclaring the whole library or some parts of it. TSC is complaining because you've changed the declarations. You have to provide your own type definitions, either inline, or for the whole module.
I've engineered or reviewed several projects that are using TypeScript with success. The teams after initial hiccups are mostly not willing to come back to pure JavaScript now.
I'm not advocating to use TS everywhere and for every project. It all depends. Many factors must be considered but some sort of type checking is usually a good thing to have.
jsynowiec | 9 years ago | on: Show HN: Boilerplate for Node.js and TypeScript with Jest tests
You can find some valuable informations about why Node.js is relevant in this article: http://thenewstack.io/enterprises-embracing-microservices-no...
jsynowiec | 9 years ago | on: Show HN: Boilerplate for Node.js and TypeScript with Jest tests
jsynowiec | 9 years ago | on: Show HN: Boilerplate for Node.js and TypeScript with Jest tests
Usually I tend to lean towards TypeScript due to:
- Much better tooling and editor/IDE integration (I'm using vscode and WebStorm),
- DefinitelyTyped repository and the availability of type definitions,
- It's subjective but TS has better documentation and examples,
Don't get me wrong, the Flow (and React) community is doing a great job and in my opinion Flow is a very good tool for static type checking. The real problem with both is the coverage/quality of type definitions and the amount of time it takes to create typedefs. Right now there are many more typedefs available for TypeScript and the community is stronger and more active.
Also, right now one common format or conversion between definition formats is not possible, see: https://twitter.com/lbljeffmo/status/787692583350829056