The dreaded CommonJS (CJS) to EcmaScript Modules (ESM) conversion. As the Javascript ecosystem continues to evolve and we continue to standardize, one unfortunate side-product for us NodeJS users, is the conversion to ESM.Admitted, as most things Node, since it isn’t running in the browser context we don’t have to convert to ESM, and it likely […]
The game of business, from the perspective of a technical founder
This post will be less about Typescript and more about programming in general, specifically from the point of view of being a technical founder. If you’ve ever dabbled in server administration, fiddled with a raspberry pi, been curious about new technology outside work, or you identify as someone with an explorative or entrepreneurial gene, this […]
To framework, or not to framework, that is the decision
Lately I’ve found myself with renewed urge to learn new things through building new. Usually that starts with a good idea “damn, it would be cool to build X!” – you know the feeling. But being a bit of a perfectionist (it’s something I’m working on), the dreams of features quickly becomes consumed by other […]
What the F are dotfiles and why should I care?
I’m sure we’ve all shared this sort of experience: You grab your recently delivered brand new shiny computer. You’re excited! It’s time to get that baby running, so you plug in the charger and quickly boot it up. Oh snap. It’s faaaaast! Nice! After sprinting through the system configuration and creating a user account, you […]
When to use .d.ts type files for global types
If you don’t already know what a .d.ts file is, I recommend reading my other post on the topic. Writing and managing types for a Typescript project is a cumbersome issue, and one that is often handled differently from project to project. A common pattern that has evolved is to “place types where they are […]
How to get started with Typescript
So, you’ve decided that Javascript is the language you want to pursue and learn. Upon googling “how to learn javascript” you quickly start seeing “Typescript” appearing again and again. Intrigued you wonder “what is Typescript? Is that something I need to know? Should I learn that instead?”. A bit worried you continue your quest for […]
How to work with union types that can be undefined
Ever struggled with figuring out how to deal with undefined? Or spent a good cup of coffee (and a half) to stop the Typescript compiler from screaming at you? In Typescript we often come across values that can have multiple values, called union types, and in some cases one of those values is undefined. If […]
“I love Typescript, but I hate the configuration”
Back upright, posture checked, fingers have just been cracked, you’ve got some good music playing and you’re ready to sit down and start coding on your new cool idea. Whilst ideas begin to unfold in your mind and you’re about to burst with creativity you envision “hey, this would be a cool opportunity to get […]
How to manage consistent types using extract
As we start unfolding Typescript and start to maintain an ever-increasing amount of types in our codebase, we might want to start doing things smarter at some point. I’m a very pragmatic person and that makes me subscribe to the idea of DRY; especially when it comes to managing types. I really do not want […]
Enabling ESM with TS, without the headaches
This post was written from an optimistic standpoint, enabling ESM and TS on a new project, making it a straight forward thing to do.If you’re migrating an existing codebase, see my recent article on that topic right here, as that’s a much harder thing to do. Are you wanting to get on the latest trend […]