Dynamically generate TypeScript Playground links
TypeScript playground has a URL param to specify the code content. This makes it possible to always have up-to-date playground links for example code!
Learning to think & build in public. Excited about tools for thinking and augmenting human capabilities.
Currently head of product & engineering @GrabbitNFT. Previously product at Microsoft PlayFab, Xbox Live, and Xbox.
TypeScript playground has a URL param to specify the code content. This makes it possible to always have up-to-date playground links for example code!
Seeing example code with syntax highlighting is great, but sometimes you've just gotta run the code and see what happens...
Whenever possible, make code interactive. Interaction is the single most effective way to teach anything, including code!
TypeScript is a structurally typed language, but can have nominal typing semantics using a technique called type branding
Theory and practice are often at tension with each other, but they shouldn't be. Each benefits from a health dose of the other.
How I transform the code in my markdown files into beautifully rendered snippets on this site.
Pulling together a bunch of language tools can be a bother, but I find automated formatting & code review tools are worth the hassle.
A structural type can be "branded" to add context to values by using the type system for annotations as is done with nominal types. Doing so makes them incompatible with structurally equivalent types.
Cross-origin resource sharing requests let a user access resources on one site from another, but only if the server performs the secret CORS handshake with the browser.
I've learned a lot from this course, and use this note to record bits I want to remember and riff on some of my observations.
An improvised pasta dish made to drawn inspiration from the flavors and sounds of the Middle East. It is hearty and surprisingly bright.
Assertion functions let the programmer narrow types using a named function, making type narrowing much more readable.