4 ms·
Typescript. When working in a shop with a large contingent of .NET developers, having a language that somewhat resembles what they are used to is a great asset.
by hanspragt 9y ago
Typescript. When working in a shop with a large contingent of .NET developers, having a language that somewhat resembles what they are used to is a great asset.
- kierenj 9y agoDare I say - but you can use Typescript with other frameworks too.. just because it's built in here / there are more resources?
- foota 9y agoI found especially that working with a project that requires a lot of extra bits to be installed (like the react ecosystem) makes working with JavaScript libraries from typescript especially painful, since you need to get typescript definitions for all of them, and they may not always mesh well together.
- eunoia 9y agoAs I commented above, you might want to take a look at https://github.com/wmonk/create-react-app-typescript https://github.com/wmonk/create-react-app-typescript. It’s really helped reduce some of that 3rd party lib / buildchain JS fatigue for me.
- WorldMaker 9y agoIn recent Typescript it defaults not found modules to type `any` and only complains if `--noImplicitAny` is used. Even with `--noImplicitAny`, it's gotten pretty easy. Leave a scratch .d.ts file somewhere in your project and when you install a new library you can start with: declare module 'libraryname' declare module 'libraryname/**/*' That gives you an explicit `any` for those libraries. Then you can go back and add types later. The number of npm packages with types directly included is growing at an impressive rate (even Facebook often bundles them for React libraries), so there's not even the need to seek out types in so many cases these days.
- nawitus 9y agoYou can easily install types from @types these days: https://www.npmjs.com/~types https://www.npmjs.com/~types I believe the latest version of Visual Studio Code can automatically install the type dependencies from the IDE (e.g. a quick fix if the type definitions are missing).
- eunoia 9y agoI’ve been using a fork of facebook’s create-react-app with typescript to generate new projects lately. It’s been great, zero friction. https://github.com/wmonk/create-react-app-typescript https://github.com/wmonk/create-react-app-typescript
- hanspragt 9y agoThere is support now (which is awesome!), but not when we were deciding on a framework back when Angular 2 was in beta.