site
site copied to clipboard
Companion website for the Learning TypeScript book.
## Overview The topic of 'branded types' keeps coming up once in a while. There aren't too many resources on it right now - and no article is as deep...
## PR Checklist - [x] Addresses an existing open issue: fixes #133 - [x] That issue was marked as [accepting prs](https://github.com/LearningTypeScript/site/issues?q=is%3Aopen+is%3Aissue+label%3A%22accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/LearningTypeScript/site/blob/main/.github/CONTRIBUTING.md) were taken ## Overview...
## Overview Speaking generally: https://softwareengineering.stackexchange.com/questions/189222/are-exceptions-as-control-flow-considered-a-serious-antipattern-if-so-why is a good summary of my perspective here. I think the most salient point is the Principle of Least Astonishment. Since exceptions can't reasonably be...
Talking with @ladybluenotes on Twitch right now - https://www.typescriptlang.org/play?#code/JYOwLgpgTgZghgYwgAgMoAs4AcUG8BQyRy2WANhAFzIgCuAtgEbQDchxjcIXc1jA9vwpc2AX3z4YtEAjDB+IZGUFYA8gDdoGbBAAUAZ0w5q2nAEpkBYshj8oyXQgX6wyANYQAnslDJDOiytrYicQfSEIADplAHMDIwgAbQ9vOH13L34YZDBPHCy-BIBdMzZrcXYiW3tHZ1dkrwAaZHU4MloIIuQC1UYAKwhZSIhwKGAIfXiAwMrg0PCKaP44lObW9pQ0lraOgv9zMuJxawB6E+QAE35kAHcuMGp0MDAsfUozmOAwdFpGSKd6Cd6MAEFB+OEYGATgAVPIQVCg4BYKHAfT6Dr6E4AZgA7AA2AAsACZ8BV5q4YvwwAhMMgALyWWakCjULGNWacbjcahgKAddnWABetAQNNAwGoAHJlGRJaSJMp+GpNFBTHpKdTMKV8EA is a commonly inconvenient quirk of the type system.
## PR Checklist - [x] Addresses an existing open issue: fixes #119 - [x] That issue was marked as [accepting prs](https://github.com/LearningTypeScript/site/issues?q=is%3Aopen+is%3Aissue+label%3A%22accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/LearningTypeScript/site/blob/main/.github/CONTRIBUTING.md) were taken ## Overview...
This comes up every once in a while. I think there are two questions to be answered: * What are the prerequisites for specifically the _Learning TypeScript_ book? * What...
https://twitter.com/Daniel_Lemesh/status/1562786609321259008
A question brought up on my Twitch stream today: overriding types of third party libraries if the types aren't made to be extended? Example: `some-library` exports an interface `MyData`, and...
https://www.typescriptlang.org/tsconfig#exclude > Specifies an array of filenames or patterns that should be skipped when resolving [include](https://www.typescriptlang.org/tsconfig#include). > > > Important: exclude only changes which files are [include](https://www.typescriptlang.org/tsconfig#include)d as a result...
I actually don't remember the historical reasons for this is the case, but have the rule memorized... In general, TypeScript won't let you access properties of a value that aren't...