Travel, Code, and Engineering

Tag: javascript


What you should use instead of TypeScript Enums

The TypeScript homepage proudly proclaims "TypeScript is JavaScript with syntax for types." It's a superset of JavaScript. Any code that's valid JavaScript is also valid TypeScript. The only thing...


Sharing dependencies in a JavaScript monorepo

The monorepo structure is an increasingly popular way to organize JavaScript code. In a JavaScript monorepo, you typically have a package.json file at the root of your project that points to the...


React Project Structure

There's not a lot of guidance out there about how to structure React projects. The guidance that is out there seems fine at first until you realize it doesn't scale much at all past the simple...


How to use TypeScript with Gatsby

I was planning to write a blog post showing you how to setup Gatsby to work with TypeScript, but then I realized it was easier to just make a Gatsby starter. So since I've already done all the hard...


How to Wrap Node's HTTPS in a Promise

Node's HTTPS package is very low level. It expects you to provide functions to deal with data as it streams in, and it doesn't provide a simple interface to get the data out once it has all...