Skip to content

Commit c790e6c

Browse files
committed
Complete Problem total-typescript#8
1 parent 72792cf commit c790e6c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/08-function-return-type-annotations.problem.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,14 @@ interface Post {
1717
* How do we ensure that makeUser ALWAYS
1818
* returns a user?
1919
*/
20-
const makeUser = () => {
21-
return {};
20+
const makeUser = (): User => {
21+
return {
22+
firstName: "Jake",
23+
id: 1,
24+
lastName: "McCambley",
25+
posts: [{ id: 1, title: "Well now you've done it!" }],
26+
role: "admin",
27+
};
2228
};
2329

2430
it("Should return a valid user", () => {

0 commit comments

Comments
 (0)