WTF Typescript?! (The Standup)
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Unlock all features
FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.
Related videos
"I suck" -ThePrimeagen
The PrimeTime
55.8k views
The Mythos Situation | TheStandup
The PrimeTime
63.3k views
AGI Achieved?! | TheStandup
The PrimeTime
85.3k views
Scam Altman's Crypto Currency | The standup
The PrimeTime
36.0k views
WTF Anthropic
The PrimeTime
239.1k views
Spiciest 2026 Predictions | The Standup
The PrimeTime
23.9k views
Worst Onboarding Experience Ever | The Standup
The PrimeTime
67.4k views
The Secret of the AWS Outage | The Standup
ThePrimeTime
72.4k views
Thought terminating cliché Teirlist | The Standup
ThePrimeTime
25.5k views
TheStandup - Omarchy Is Amazing
ThePrimeTime
69.9k views
Top Comments (10)
I can't believe I'm watching a show called the standup and everybody is sat down. My disappointment is immeasurable.
I would really appreciate some sort of indicator in the video titles of Standup episode. Much love, great podcast.
I must admit that Casey is a win for this kind of videos. He is so invested into everything which makes the talks deep and interesting. Instead of just bashing on memes, he is trying to understand them and then decide. Super valuable to be part of this process. Thanks!
`(number | string)[]` is a heterogeneous array where any element can be number or string. `number[] | string[]` is a homogenous array where elements are either all numbers or all strings.
01:09:30 This is a well known topic in type systems called "type covariance". A container type is covariant if it preserves the subtyping relationships of contained types, i.e. since `number` is a subtype of `number | string` then `number[]` is a subtype of `(number | string)[]`. The issue is having covariant mutable container types is not sound (that's why everyone calls this a bug in TS). Languages that track mutability often have covariant immutable container types (no bug if you can't push to the array) but invariant mutable container types. Other languages have to choose either (a) don't have covariant container types, (b) have them but throw a runtime error when they're used in an unsound way, or (c) have them and just ignore the issue (like TS). It seems like since the TS type system is already unsound in many other ways (`any`, casting, etc) the TS team purposefully chose to have container types be covariant because it is useful in many cases and it's safe if you don't mutate the container.
I really want to witness Casey and the gang fix a TS compiler bug. Even if there's no pull request, just seeing a quick and dirty fix to a bug we're now all familiar with in compiler code would be sick.
Anyone wondering about that enum difference from 16:22: TLDR: There’s no reverse mapping (e.g., "valueA": "A") because string values are not guaranteed to be unique, and creating reverse mappings for strings could lead to ambiguity or complexity. For numeric enums, TypeScript creates a bidirectional mapping (a reverse mapping) between the enum member names and their values. This means you can access an enum member by its numeric value because TypeScript generates an object with both name-to-value and value-to-name mappings. enum NumericEnum { A = 1, B = 2, } TypeScript compiles this enum into an object like this: { A: 1, B: 2, 1: "A", 2: "B", } For string enums, TypeScript does not create a reverse mapping. String enums are compiled into an object that maps enum member names to their string values, but not the other way around. enum StringEnum { A = "valueA", B = "valueB", } TypeScript compiles the enum into an object like this: { A: "valueA", B: "valueB", }
Casey discovering how "const" works is hilarious
Casey’s lighting makes him look like Two-Face from the Batman animated series
Missed opportunity to call this “Everything AI Doesn’t Know About Typescript”
Unlock the Data Inside
Turn Videos into Knowledge
- Get FREE 10/day: transcripts, summaries, chats
- Chat with videos, export text & PDF
- $1 free API credit for RAG, chatbots & research
Free forever plan • All features unlocked
Top Comments (10)
I can't believe I'm watching a show called the standup and everybody is sat down. My disappointment is immeasurable.
I would really appreciate some sort of indicator in the video titles of Standup episode. Much love, great podcast.
I must admit that Casey is a win for this kind of videos. He is so invested into everything which makes the talks deep and interesting. Instead of just bashing on memes, he is trying to understand them and then decide. Super valuable to be part of this process. Thanks!
`(number | string)[]` is a heterogeneous array where any element can be number or string. `number[] | string[]` is a homogenous array where elements are either all numbers or all strings.
01:09:30 This is a well known topic in type systems called "type covariance". A container type is covariant if it preserves the subtyping relationships of contained types, i.e. since `number` is a subtype of `number | string` then `number[]` is a subtype of `(number | string)[]`. The issue is having covariant mutable container types is not sound (that's why everyone calls this a bug in TS). Languages that track mutability often have covariant immutable container types (no bug if you can't push to the array) but invariant mutable container types. Other languages have to choose either (a) don't have covariant container types, (b) have them but throw a runtime error when they're used in an unsound way, or (c) have them and just ignore the issue (like TS). It seems like since the TS type system is already unsound in many other ways (`any`, casting, etc) the TS team purposefully chose to have container types be covariant because it is useful in many cases and it's safe if you don't mutate the container.
I really want to witness Casey and the gang fix a TS compiler bug. Even if there's no pull request, just seeing a quick and dirty fix to a bug we're now all familiar with in compiler code would be sick.
Anyone wondering about that enum difference from 16:22: TLDR: There’s no reverse mapping (e.g., "valueA": "A") because string values are not guaranteed to be unique, and creating reverse mappings for strings could lead to ambiguity or complexity. For numeric enums, TypeScript creates a bidirectional mapping (a reverse mapping) between the enum member names and their values. This means you can access an enum member by its numeric value because TypeScript generates an object with both name-to-value and value-to-name mappings. enum NumericEnum { A = 1, B = 2, } TypeScript compiles this enum into an object like this: { A: 1, B: 2, 1: "A", 2: "B", } For string enums, TypeScript does not create a reverse mapping. String enums are compiled into an object that maps enum member names to their string values, but not the other way around. enum StringEnum { A = "valueA", B = "valueB", } TypeScript compiles the enum into an object like this: { A: "valueA", B: "valueB", }
Casey discovering how "const" works is hilarious
Casey’s lighting makes him look like Two-Face from the Batman animated series
Missed opportunity to call this “Everything AI Doesn’t Know About Typescript”