From 7edc61cfea49609a389bebd2e101961483217b54 Mon Sep 17 00:00:00 2001 From: Stephan Noel <34415120+stephan-noel@users.noreply.github.com> Date: Tue, 4 Feb 2025 23:39:42 -0300 Subject: [PATCH] Fix ts-expect error failing for the wrong reason canvasNode.x; is failing because "x" does not exist on CanvasNode, whereas what the example is trying to demonstrate is that it fails in typescript because the property #x is private. --- .../112-public-and-private-properties.solution.2.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/030-classes/112-public-and-private-properties.solution.2.ts b/src/030-classes/112-public-and-private-properties.solution.2.ts index 1615f640..e763c023 100644 --- a/src/030-classes/112-public-and-private-properties.solution.2.ts +++ b/src/030-classes/112-public-and-private-properties.solution.2.ts @@ -45,7 +45,7 @@ it("Should not be able to access x and y from the outside", () => { const canvasNode = new CanvasNode(); // @ts-expect-error - canvasNode.x; + canvasNode.#x; // @ts-expect-error - canvasNode.y; + canvasNode.#y; });