Skip to content

Commit fbc98e8

Browse files
committed
Ensure code samples matched exercises
1 parent f657898 commit fbc98e8

File tree

4 files changed

+4
-11
lines changed

4 files changed

+4
-11
lines changed

exercises/05-createComponent.code.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export const createComponent = <TConfig extends Record<string, string>>(
22
config: TConfig,
33
) => {
44
return (variant: keyof TConfig, ...otherClasses: string[]): string => {
5-
return [config[variant], otherClasses].join(" ");
5+
return config[variant] + " " + otherClasses.join(" ");
66
};
77
};
88

exercises/07-databaseSeeder.exercise.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,10 @@ const usage = async () => {
170170

171171
/**
172172
* 🛠 We're going to build this up again from scratch. To
173-
* get started, comment out DbSeeder AND usage above, and
174-
* uncomment DbSeeder and usage below:
173+
* get started, comment out DbSeeder AND usage. Add the
174+
* commented-out code above INSTEAD and uncomment it.
175175
*/
176176

177-
/**
178-
* 💡 Note that DbSeeder is no longer generic. Neither
179-
* are addUser and addPost.
180-
*/
181177
// export class DbSeeder {
182178
// public users: DbShape["users"] = {};
183179
// public posts: DbShape["posts"] = {};

exercises/08-removeMapsFromObj.code.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,3 @@ export const removeMapsPrefixFromObj = <TObj>(
2525
}
2626
return newObj;
2727
};
28-
29-
const newObj = removeMapsPrefixFromObj({ "maps:longitude": 12 });

exercises/09-router.code.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ const routes = makeRouter({
3232
},
3333
});
3434

35+
routes.goTo("/");
3536
routes.goTo("/dashboard", {
3637
page: "1",
3738
something: "",
3839
});
39-
40-
routes.goTo("/");

0 commit comments

Comments
 (0)