Almost 6 months ago I have made a decision to move all our frontend projects from Flow to TypeScript. It was a tough battle inside my head. So, I have decided to write it down to help other people to choose the right tool. And not to make my mistakes.
We made a silly joke on Twitter yesterday (this is what Twitter is for, no?) about test doubles and that unfortunate moment when they inevitably surprise you.
This prompted Shlomo Kraus to reach out and tell us about Mockshot. In brief:
Imagine you could:
- Never manually write a mock again
- Have a guarantee that your mocks are always valid
Sounds nice! It works by using Jest’s snapshot tests output to generate mocks to be used in other tests.
This is purposeful coupling, which seems like it could backfire in the long-run. However, the team behind the library has been using it for over a year and are still singing its praises. For more on their experience creating and using it, read this.
npm install type-fest and use them in your project or simply bookmark this as a reference for the many advanced types that are built in to the TypeScript project itself. Submitting your own types is promoted. Also, a good idea on declined types:
If we decline a type addition, we will make sure to document the better solution here.
Lambcycle is a middleware for lambda functions. It defines a configurable life-cycle and allows you to focus on your application’s logic. It has a “Feature as Plugin” approach, so you can easily create your own plugins or reuse your favorite packages with very little effort 🐑 🛵.
The author goes deep on why Lambcycle solves a serious problem over on Medium.
Panelists Nick Nisi, Suz Hinton, and Kevin Ball chat about the perceived Great Divide in front end development, why 2019 is the year of TypeScript, and shout outs to inspirational members of the community.
Kent C. Dodds shares the backstory of
paypal-scripts, a tool that encapsulates all the tools common to PayPal applications and published modules and why TypeScript was a fit. Kent took a poll in their
#paypal-scripts Slack channel and 100% of respondents said they wanted the change. Here’s what happened next…
About a week later, I had totally migrated
paypal-scriptsfrom supporting Flow to supporting TypeScript (most of that time was making all the tools recognize
.tsxfiles 🙄 and allowing
paypal-scriptsto dogfood itself which is kinda tricky 🐶).
Then we had Christmas break 🎄 and the week we got back after the new year 🎆, it was merged and now every new project starts off with modern tools that will stay updated by default and will be statically typed with TypeScript.
DevHub helps you take back control of your GitHub workflow and stay on top of everything important going on.
Available on the web, iOS, and Android (thanks to React Native).
I put Terminus’ tagline in scare quotes because while it’s intriguing, I do not know for sure whether it delivers on that promise. In more of its own words, Terminus is:
…heavily inspired by Hyper. It is, however, designed for people who need to get things done.
Them sound like fighting words. But what does “designed for people who need to get things done” mean, exactly? From the feature list in the README, I think maybe it means that it takes Windows more seriously than Hyper and handles printing output more quickly. But that’s just a guess…
I’d love to see a roundup and comparison of this new breed of Electron-based terminals. Anybody game?
The motivation behind NearDB:
While working on building edge applications for higher performance and lower latency there is a need store persistent data also on edge. There are multiple distributed database solutions but they are very involved and costly while having a much lower global footprint than a CDN. The idea came up to leverage ubiquitous and mature infrastructure like cloud storage and CDNs to deliver a persistent data solution from the edge.
You can use this web app as a boilerplate for building your own SaaS product. The app has many common SaaS features, so you can focus on the features that differentiate your product.
As with most boilerplates, this is opinionated about its stack, which features:
React, Material-UI, Next, MobX, Express, Mongoose, MongoDB, Typescript
If you need a JS runtime that supports TypeScript out of the box and has security as a top-most priority, star this repo and come back when it’s no longer “Segfaulty”.
Feature bullets! 👇
- No package.json, no npm. Not backwards compatible with Node
- Single executable
- Defaults to read-only file system access
- Always dies on uncaught errors
- Supports top-level await
EDIT: it’s worth noting that this project is by Ryan Dahl, inventor of Node.js.
Jerod Santo, Nick Nisi, and Christopher Hiller talk about what TypeScript is and why we should care, who’s using TypeScript, and thoughts on developer titles.
Pipe some JSON to the
quicktype CLI and it will spit out types and code to read/write/validate the data in your language of choice. Currently supports 10 target languages. There’s also a web-based version so you can kick the tires.