We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 70958b7 commit f2ba76dCopy full SHA for f2ba76d
packages/express/src/example/liveview/ios.ts
@@ -10,11 +10,11 @@ export const iosLiveView = createLiveView({
10
console.log("event", event);
11
switch (event.type) {
12
case "toggle-favorite":
13
- favorites[event.name as Cat] = !favorites[event.name as Cat];
+ favorites[event.name] = !favorites[event.name];
14
break;
15
}
16
},
17
- render: (ctx) => {
+ render: () => {
18
return html` <list>
19
${cats.map((cat) => {
20
return html`
@@ -50,8 +50,6 @@ const cats = [
50
"Siegfried",
51
"Truman",
52
"Washy",
53
-] as const;
+];
54
55
-type Cat = typeof cats[number];
56
-
57
-const favorites = {} as Record<Cat, boolean>;
+const favorites: Record<string, boolean> = {};
0 commit comments