2021-10-10
|~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…
2021-10-10
|~4 min read
|675 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…
2021-10-10
|~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…
2021-10-10
|~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…
2021-10-10
|~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…
2021-10-10
|~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…
2021-10-10
|~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…
2021-10-10
|~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…
2021-10-10
|~3 min read
|439 words
When I wrote about using ESLint with Typescript previously, I assumed that the entire project would be using Typescript. There are plenty of…
2021-10-10
|~6 min read
|1053 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…
2021-10-10
|~2 min read
|344 words
I recently discovered AWS’s cli for managing serverless applications. On the face, this feels like a fantastic way to manage new…
2021-10-10
|~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…
2021-10-10
|~5 min read
|916 words
I’ve been writing recently about setting up projects with Typescript as well as Babel and ESLint. Those explorations, however, we all in…
2021-10-10
|~2 min read
|317 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…
2021-10-10
|~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…
2021-10-10
|~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…
2021-10-10
|~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…
2021-10-10
|~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…
2021-10-10
|~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…
2021-10-10
|~1 min read
|129 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…
2021-10-10
|~1 min read
|129 words
The following is a simple TSConfig that I’ve found helpful when writing simple node applications. I’ve found myself copying and pasting it…
2021-10-10
|~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…
2021-10-10
|~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…
2021-10-10
|~2 min read
|222 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…
2021-10-10
|~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…
2021-10-10
|~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…
2021-10-10
|~1 min read
|162 words
I came across the following function in a codebase today and struggled to see what was happening - the combination of classes with…
2021-10-10
|~1 min read
|161 words
I came across the following function in a codebase today and struggled to see what was happening - the combination of classes with…
2021-10-10
|~1 min read
|198 words
Came across an interesting example of a rarely used feature (at least for me) in Javascript creating unexpected results with Typescript…
2021-10-10
|~1 min read
|198 words
Came across an interesting example of a rarely used feature (at least for me) in Javascript creating unexpected results with Typescript…
2021-10-10
|~4 min read
|726 words
universe of options I want to highlight one way to create a subset of data. To get us started, let’s think about a universe of data. It’s a…
2021-10-10
|~4 min read
|724 words
I want to highlight one way to create a subset of data. To get us started, let’s think about a universe of data. It’s a circle. Everything…
2021-10-10
|~6 min read
|1108 words
When does it make sense to use a reducer vs a simple state value with React’s Hooks? There’s no hard-and-fast rule, but the React team…
2021-10-10
|~6 min read
|1108 words
When does it make sense to use a reducer vs a simple state value with React’s Hooks? There’s no hard-and-fast rule, but the React team…
2021-10-10
|~2 min read
|394 words
I’ve written in the past about the benefits of in writing better interfaces with Typescript. Today, I found out about ’s mirror: .1 Quick…
2021-10-10
|~2 min read
|394 words
I’ve written in the past about the benefits of in writing better interfaces with Typescript. Today, I found out about ’s mirror: .1 Quick…
2021-10-10
|~2 min read
|342 words
Working on a component that receives a prop where the status are defined by an enum (I’m working in Typescript). The problem arose when a…
2021-10-10
|~2 min read
|342 words
Working on a component that receives a prop where the status are defined by an enum (I’m working in Typescript). The problem arose when a…
2021-10-10
|~4 min read
|686 words
When does it make sense to use a Generic in a Typescript type? How do you create a type that takes a Generic? I’ve read through the…
2021-10-10
|~4 min read
|686 words
When does it make sense to use a Generic in a Typescript type? How do you create a type that takes a Generic? I’ve read through the…
2021-10-10
|~2 min read
|312 words
I am trying to reduce an array of React Nodes to an array of React Elements. Specifically, I’m trying to extract the title prop from those…
2021-10-10
|~2 min read
|312 words
I am trying to reduce an array of React Nodes to an array of React Elements. Specifically, I’m trying to extract the title prop from those…
2021-10-10
|~3 min read
|554 words
Instead of documenting an interface that is redundant, but only a partial, we can use to allow the interface to automatically be linked, w…
2021-10-10
|~3 min read
|555 words
Instead of documenting an interface that is redundant, but only a partial, we can use to allow the interface to automatically be linked, w…
2021-10-10
|~1 min read
|164 words
The short answer: there is no difference. When investigating, I was steered to the Typescript Handbook1 which notes: The type…
2021-10-10
|~1 min read
|164 words
The short answer: there is no difference. When investigating, I was steered to the Typescript Handbook1 which notes: The type…
2021-10-10
|~4 min read
|614 words
Using third party libraries is great when they do exactly what you want them to do. When it comes to extending them, however, it can get…
2021-10-10
|~4 min read
|612 words
Using third party libraries is great when they do exactly what you want them to do. When it comes to extending them, however, it can get…
2021-10-10
|~2 min read
|342 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…
2021-10-10
|~2 min read
|342 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…
2021-10-10
|~2 min read
|218 words
The file is a declaration file. In this case, it’s a declaration file for Typescript files. What does that actually mean though? The…
2021-10-10
|~2 min read
|220 words
The file is a declaration file. In this case, it’s a declaration file for Typescript files. What does that actually mean though? The…