Articles on Typescript
Last updated: 2022/11/17
Top deep-dives on Typescript
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?
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.
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.
Huy gives a brief overview of how the TypeScript compiler works, with diagrams that are worth a thousand words.
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.
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.
Kimmo Brunfeldt does a deep-dive into implementing types for Tailwind when working in TypeScript with React.
- Their latest version is already supported by Babel and will soon be supported by TypeScript
- Decorators are a keyword that starts with an symbol and can be put in front of classes and class members (such as methods) to enable a number of different functionalities
- They are mostly an object-oriented feature and popular in OOP frameworks and libraries
- 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
Daniel Rosenwasser presents the new changes in TypeScript 4.6.
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.