Articles on Typescript

Last updated: 2023/02/07

Top deep-dives on Typescript

TypeScript: Stop Using 'any', There's a Type For That

If you're using TypeScript, you might sometimes be tempted to take the easy way out and slap the any type on something you can't be bothered to type. Well in this article, Alejandro Dustet and Wil Hall discuss the intricacies of why if you use the any type in TypeScript, you're gunna have a bad time mmkay?

TypeScript Builders: Improving your types one step at a time

I honestly feel like I lose a significant amount of time trying to figure out what standard I want to use (like when I'm naming variables). Programming styles, or I guess design frameworks, are useful because they give you a guiding light on how to layout your project and/or what standard to follow. In this extensive article, Steven Waterman takes a simple pipeline example, implements a factory in JavaScript to churn them out, then goes on to implementing it in TypeScript using builders. Honestly a great article if you're looking to get familiar with the builder pattern.

Inheritance vs Composition: Which is Better for Your JavaScript Project?

As a person who writes code, I've found that overall, it's best when I don't have code with the same functionality in two places. It's a pretty common design principle, and something that OOP really strives for. In this article, Fernando Doglio presents two OOP principles that implement the same thing, but in fairly different ways.

The Single-Valued Type Pattern for TypeScript

Web development gets pretty repetitive. But it's not that nice kind of repetitive which can be solved with big copies and pastes, because normally you'll have to change the naming of all of the variables and  functions so that someone in the future will be able to understand what's actually happening. At that point, it feels easier to just rewrite the code from scratch. Luckily Drew Colthorp has shared a useful pattern in regards to how "how [they] deal with cases where [they] want flexible, composable APIs for dealing with statically-known concerns about an application". They being Atomic.

JavaScript and TypeScript Hidden Gems: Decorators

Decorators are a powerful tool that exist in other languages, but are currently in the proposal stage of being added to TypeScript and JavaScript. But how are we meant to understand how to use this tool properly, when TypeScript's own documentation uses it incorrectly? Fernando Doglio's example driven article dives into the many purposeful uses of decorators, emphasizing that in order to use them correctly, "the rest of your logic needs to work with or without the decorators".

Practical frontend architecture

One of the challenges faced by web developers is figuring out what tools to choose from the plethora of options. Jared Gorski's article focuses on how he used application specifications as a strict criteria for selecting React, TypeScript, Next.js, and Apollo GraphQl as the tools for a frontend upgrade.

TypeScript / How the compiler compiles

Huy gives a brief overview of how the TypeScript compiler works, with diagrams that are worth a thousand words.

Principles of Object-Oriented Programming in TypeScript

Camilo Reyes demonstrates OOP principles in TypeScript.

Scrollable Grid with Just-in-Time Data Loading – Part 5: Hooking up the Database

Modern web development technology makes it possible (and fairly easy) to do some very cool implementations. Are they always absolutely necessary? Not really, but humans love fun things, and making the web fun is great. In this ultimate article of a five part series, Lydia Cupery does the fairly simple job of replacing fake data with real data queried from a GraphQL database. However, I'm sharing this post because the series as a whole is fairly interesting, so be a weirdo like me and read the end first, then start it from the beginning!

Frickin' Shaders With Frickin' Laser Beams

Libraries for rendering on GPUs aren't very editable. In this thorough article, Steven Wittens explains why this is via an implementation of a simple shader in GLSL, and concludes with a solution in the form of a linker.

Interactive introduction to [OpenVSCode Server]

Just a heads up, this page kind of sucks to read on a mobile. If you want to go through with it, just minimize the side panels. "OpenVSCode Server is a fork of VS Code that extends the editor to be runnable in the browser, speaking to a web server that provides a remote dev environment". This article uses the source code to demonstrate how the this is achieved, including the setting up of two RPC channels, an HTTP server, and upgrading to a websocket server.

Announcing TypeScript 4.6

Daniel Rosenwasser presents the new changes in TypeScript 4.6.

Assembly interpreter inside of TypeScript's type system

TypeScript's type system is advanced enough to be able to host entire programming languages inside of it. In the article, Jude Hunter discusses how how he created a dialect of Assembly inspired by RISC and ARMv7 called ts-asm.
Some highlights:

  • Other languages have been implemented in TypeScript types, including out ts-sql and typefuck
  • "a Branch or a Jump instruction tells the processor to continue execution from a different place in the program, instead of the next instruction"
  • This whole article is very impressive

Ezno: a JavaScript compiler featuring checking, correctness and performance

Ezno is a JavaScript compiler featuring type checking, correctness, and performance for building full-stack websites. In this article, Ben presents the compiler, explains that it is still in its infancy, but has the potential to be very useful for preventing errors in JavaScript code. The compiler is compatible with TypeScript type annotations and can work without any type annotations at all.
Some highlights:

  • Ezno's type checker is built from scratch and is somewhat of an extension of the TypeScript compiler
  • Ezno has support for JSX syntax
  • No VDOM

Speeding up the JavaScript ecosystem - eslint

Marvin Hagemeister discusses the performance of eslint and how it can be improved.
Some highlights:

  • "Linting is the act of finding patterns in code that could lead to mistakes or ensure a consistent reading experience"
  • Lots of potential for time savings in their selector engine and AST conversion process
  • A perfect linter written in JS would be able to hit sub-second run times

Want to see more in-depth content?

subscribe to my newsletter!

Other Articles