From 0788d790eea18c92cc45c91e5bb3f0739917cc3f Mon Sep 17 00:00:00 2001 From: Matt Pocock Date: Thu, 22 Jun 2023 10:46:13 +0100 Subject: [PATCH] Added ts-expect-error --- .../32-satisfies-vs-annotation-vs-as.problem.tsx | 2 +- .../32-satisfies-vs-annotation-vs-as.solution.tsx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/04-advanced-props/32-satisfies-vs-annotation-vs-as.problem.tsx b/src/04-advanced-props/32-satisfies-vs-annotation-vs-as.problem.tsx index b8dbb34..dc99375 100644 --- a/src/04-advanced-props/32-satisfies-vs-annotation-vs-as.problem.tsx +++ b/src/04-advanced-props/32-satisfies-vs-annotation-vs-as.problem.tsx @@ -3,7 +3,7 @@ import { Equal, Expect } from "../helpers/type-utils"; const buttonProps = { type: "button", - // This should be erroring! Why isn't it? + // @ts-expect-error illegalProperty: "I AM ILLEGAL", }; diff --git a/src/04-advanced-props/32-satisfies-vs-annotation-vs-as.solution.tsx b/src/04-advanced-props/32-satisfies-vs-annotation-vs-as.solution.tsx index ae9f877..c625247 100644 --- a/src/04-advanced-props/32-satisfies-vs-annotation-vs-as.solution.tsx +++ b/src/04-advanced-props/32-satisfies-vs-annotation-vs-as.solution.tsx @@ -4,8 +4,9 @@ import { Equal, Expect } from "../helpers/type-utils"; const buttonProps = { type: "button", // This should be erroring! Why isn't it? + // @ts-expect-error illegalProperty: "I AM ILLEGAL", -} satisfies ComponentProps<"button">; +}; <>