From e5d4f1fa823dc83b2a51b9b613b561e1d2e19375 Mon Sep 17 00:00:00 2001 From: LorisYanis Date: Wed, 17 Jan 2024 12:46:54 +0200 Subject: [PATCH] Improved it description for 24 --- .../24-function-overloads-vs-union-types.problem.ts | 4 ++-- .../24-function-overloads-vs-union-types.solution.1.ts | 4 ++-- .../24-function-overloads-vs-union-types.solution.2.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/05-function-overloads/24-function-overloads-vs-union-types.problem.ts b/src/05-function-overloads/24-function-overloads-vs-union-types.problem.ts index 35f338f..da87af4 100644 --- a/src/05-function-overloads/24-function-overloads-vs-union-types.problem.ts +++ b/src/05-function-overloads/24-function-overloads-vs-union-types.problem.ts @@ -8,7 +8,7 @@ function runGenerator(generator: unknown) { return generator.run(); } -it("Should accept an object where the generator is a function", () => { +it("Should accept an object with a function run", () => { const result = runGenerator({ run: () => "hello", }); @@ -18,7 +18,7 @@ it("Should accept an object where the generator is a function", () => { type test1 = Expect>; }); -it("Should accept an object where the generator is a function", () => { +it("Should accept an argument where the generator is a function", () => { const result = runGenerator(() => "hello"); expect(result).toBe("hello"); diff --git a/src/05-function-overloads/24-function-overloads-vs-union-types.solution.1.ts b/src/05-function-overloads/24-function-overloads-vs-union-types.solution.1.ts index 72d45a9..74acb41 100644 --- a/src/05-function-overloads/24-function-overloads-vs-union-types.solution.1.ts +++ b/src/05-function-overloads/24-function-overloads-vs-union-types.solution.1.ts @@ -10,7 +10,7 @@ function runGenerator(generator: { run: () => string } | (() => string)) { return generator.run(); } -it("Should accept an object where the generator is a function", () => { +it("Should accept an object with a function run", () => { const result = runGenerator({ run: () => "hello", }); @@ -20,7 +20,7 @@ it("Should accept an object where the generator is a function", () => { type test1 = Expect>; }); -it("Should accept an object where the generator is a function", () => { +it("Should accept an argument where the generator is a function", () => { const result = runGenerator(() => "hello"); expect(result).toBe("hello"); diff --git a/src/05-function-overloads/24-function-overloads-vs-union-types.solution.2.ts b/src/05-function-overloads/24-function-overloads-vs-union-types.solution.2.ts index 89cb817..1cdbd37 100644 --- a/src/05-function-overloads/24-function-overloads-vs-union-types.solution.2.ts +++ b/src/05-function-overloads/24-function-overloads-vs-union-types.solution.2.ts @@ -8,7 +8,7 @@ function runGenerator(generator: { run: () => string } | (() => string)) { return generator.run(); } -it("Should accept an object where the generator is a function", () => { +it("Should accept an object with a function run", () => { const result = runGenerator({ run: () => "hello", }); @@ -18,7 +18,7 @@ it("Should accept an object where the generator is a function", () => { type test1 = Expect>; }); -it("Should accept an object where the generator is a function", () => { +it("Should accept an argument where the generator is a function", () => { const result = runGenerator(() => "hello"); expect(result).toBe("hello");