From 0a599c1e49494024e20ecdcec0ed1796f69c451c Mon Sep 17 00:00:00 2001 From: j-n-f <154852324+j-n-f@users.noreply.github.com> Date: Sat, 1 Feb 2025 15:09:33 -0500 Subject: [PATCH] Update TS for Functional Programmers.md function `height()` is actually calculating width. The height of a triangle would be given by `s.y` (which isn't in the `"square"` variant). --- .../copy/en/get-started/TS for Functional Programmers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/documentation/copy/en/get-started/TS for Functional Programmers.md b/packages/documentation/copy/en/get-started/TS for Functional Programmers.md index 9cf3038a53b8..92c22bbe3d3e 100644 --- a/packages/documentation/copy/en/get-started/TS for Functional Programmers.md +++ b/packages/documentation/copy/en/get-started/TS for Functional Programmers.md @@ -427,7 +427,7 @@ type Shape = | { kind: "square"; x: number } | { kind: "triangle"; x: number; y: number }; // ---cut--- -function height(s: Shape) { +function width(s: Shape) { if (s.kind === "circle") { return 2 * s.radius; } else {