From c97acefaa60d46d226360f87754500c1d9f59e06 Mon Sep 17 00:00:00 2001 From: prescientmoon <git@moonythm.dev> Date: Thu, 19 Jun 2025 13:36:45 +0200 Subject: [PATCH] Tight -> narrow --- content/echoes/ts-array-variance-standup.dj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/echoes/ts-array-variance-standup.dj b/content/echoes/ts-array-variance-standup.dj index 8944ea3..59975c5 100644 --- a/content/echoes/ts-array-variance-standup.dj +++ b/content/echoes/ts-array-variance-standup.dj @@ -69,7 +69,7 @@ const nums: number[] = [0] nums.push("oops") // type error! ``` -The issue is that (informally), at every point, TypeScript keeps track of the tightest type possible for the variables involved. That is, `nums` has type `number[]`, hence the type mismatch. Still, we can guide TypeScript into widening said "tightest type" with a type annotation, thus recreating the bug without any new functions: +The issue is that (informally), at every point, TypeScript keeps track of the most narrow type possible for the variables involved. That is, `nums` has type `number[]`, hence the type mismatch. Still, we can guide TypeScript into widening said "most narrow type" with a type annotation, thus recreating the bug without any new functions: ```ts const nums: number[] = [0]