Skip to content

Commit c801a67

Browse files
committed
Made 22 problem easier
1 parent ab90c00 commit c801a67

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/05-function-overloads/22-function-overloads-vs-conditional-types.problem.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ import { Equal, Expect } from "../helpers/type-utils";
55
* This time, let's try and solve this one
66
* with function overloads too!
77
*/
8-
export const youSayGoodbyeISayHello = (greeting: "goodbye" | "hello") => {};
8+
export const youSayGoodbyeISayHello = (greeting: "goodbye" | "hello") => {
9+
return greeting === "goodbye" ? "hello" : "goodbye";
10+
};
911

1012
it("Should return goodbye when hello is passed in", () => {
1113
const result = youSayGoodbyeISayHello("hello");

0 commit comments

Comments
 (0)