2022-11-28
|~1 min read
|194 words
I was working on a project recently where I wanted to make sure that my icon links were accessible. I found Kitty Giraudel’s great blog post…
2022-11-28
|~2 min read
|242 words
I was working on a project recently where I wanted to check incoming data to see if it conformed to my allow list. To do this, I had an…
2022-11-28
|~2 min read
|382 words
NextJS has documentation for layouts. It even has a section for Typescript. Unfortunately, when I tried to follow it, I ran into a whole…
2022-11-28
|~2 min read
|206 words
I’ve been writing more and more Typescript in lieu of vanilla Javascript. While I’ve been able to add a number of scripts to pre-build steps…
2022-11-28
|~2 min read
|295 words
I added a script to a Next.JS project recently which I wanted to run as part of a pre-build step with . The script lived in a scripts folder…
2022-11-28
|~5 min read
|966 words
Preamble I was recently working on porting my blog to Remix. As part of this, I needed to parse my markdown files that constitute all of the…
2022-11-28
|~2 min read
|276 words
I was working on a project recently that was using Mongo as its data store. Unforuntately, because I was using the node driver for directly…
2022-11-28
|~2 min read
|249 words
I like to write most of my code in Typescript these days, so when I had an opportunity to start a new project recently, I wanted to make…
2022-11-28
|~1 min read
|161 words
Fun little toy problem: implementing a flat map. The function can take a list of nested arrays of any type and an optional second argument…
2022-11-28
|~2 min read
|347 words
Imagine you have a prop that you want to be passed all the way through to the DOM. If you try and pass through a prop that isn’t…
2022-11-28
|~7 min read
|1238 words
Snowpack is a new(er) addition to the build tools available on the front-end. I had the opportunity to start a new project recently and I…
2022-11-28
|~4 min read
|673 words
Last time I wrote about using React’s with Typescript I ended up relying on Type Guards to get my actions typed and ended with an claim…
2022-11-28
|~2 min read
|303 words
In Javascript, we can write functions as declarations or expressions. And while I typically write my functions as expressions, I normally…
2022-11-28
|~3 min read
|446 words
I’ve written in the past about composability and polymorphism in the past and it’s a concept that continues to interest me. I was speaking…
2022-11-28
|~3 min read
|432 words
I’ve been working on mastering generics for a few years at this point. While I’m making progress, it’s certainly still a work in progress…
2022-11-28
|~3 min read
|472 words
Update: I returned to the codebase after I let my computer think about what it’d done (i.e., the next day). When I converted the Type back…
2022-11-28
|~1 min read
|184 words
Javascript is the wild west. There are no rules. Or that’s what they tell me at a minimum. A large percentage of this blog is dedicated to…
2022-11-28
|~4 min read
|662 words
In languages like Java and C#, function overloading is quite popular. The way I understand it: instead of having multiple functions, you…
2022-11-28
|~3 min read
|438 words
When I wrote about using ESLint with Typescript previously, I assumed that the entire project would be using Typescript. There are plenty of…
2022-11-28
|~6 min read
|1050 words
I’ve written in the past about updating a basic prettier config to handle multiple file types. I’ve also discussed using git hooks to ensure…
2022-11-28
|~2 min read
|342 words
I recently discovered AWS’s cli for managing serverless applications. On the face, this feels like a fantastic way to manage new…
2022-11-28
|~4 min read
|648 words
Update: I wrote a follow up to this post that takes a slightly different approach by using source maps for better debugging and focuses on…
2022-11-28
|~5 min read
|915 words
I’ve been writing recently about setting up projects with Typescript as well as Babel and ESLint. Those explorations, however, we all in…
2022-11-28
|~2 min read
|313 words
Previously, I wrote about getting Typescript set up for a new project. Today, I want to discuss adding Babel and ESLint to the mix. Getting…
2022-11-28
|~3 min read
|429 words
For a long time I was using s to limit the values I could use for accessing keys on an interface. This process, was unwieldy, however and…
2022-11-28
|~4 min read
|695 words
I was working on a project recently where I wanted a generic approach to updating keys on an object. Type safety was being guaranteed at the…
2022-11-28
|~5 min read
|869 words
I’ve written in the past about a simple boiler plate for node applications. Today, however, I want to talk about a more generic boiler…
2022-11-28
|~5 min read
|914 words
I was discussing a refactor for some types recently with a colleague when he suggested I use a assertion. There are several good articles…
2022-11-28
|~3 min read
|423 words
I was setting up a new typescript project the other day when I realized that there were two compiler options that felt very similar: and…
2022-11-28
|~1 min read
|127 words
The following is a simple that I’ve found helpful when writing simple node applications. I’ve found myself copying and pasting it between…
2022-11-28
|~1 min read
|199 words
Tonight, had a real head scratcher: how to instantiate a class in Typescript that uses a constructor without a compiler error! In Vanilla JS…
2022-11-28
|~1 min read
|199 words
We use Enums a lot in our Typescript code to make sure that we’re using a value that we expect. One way that we use the Enum is as the basis…