chore: fixed build errors
6ab34aaf
3 file(s) · +7 −7
| 136 | 136 | } else if (post && post.feedId) { |
|
| 137 | 137 | // Create new read status |
|
| 138 | 138 | insert("readStatus", { |
|
| 139 | - | postId: postId as any, |
|
| 139 | + | postId: postId, |
|
| 140 | 140 | feedId: post.feedId, |
|
| 141 | 141 | isRead: true, |
|
| 142 | 142 | }); |
|
| 166 | 166 | } else if (!existingStatus && post.feedId) { |
|
| 167 | 167 | // Create new read status |
|
| 168 | 168 | insert("readStatus", { |
|
| 169 | - | postId: post.id as any, |
|
| 169 | + | postId: post.id, |
|
| 170 | 170 | feedId: post.feedId, |
|
| 171 | 171 | isRead: true, |
|
| 172 | 172 | }); |
|
| 196 | 196 | } else if (!existingStatus && post.feedId) { |
|
| 197 | 197 | // Create new unread status |
|
| 198 | 198 | insert("readStatus", { |
|
| 199 | - | postId: post.id as any, |
|
| 199 | + | postId: post.id, |
|
| 200 | 200 | feedId: post.feedId, |
|
| 201 | 201 | isRead: false, |
|
| 202 | 202 | }); |
|
| 1 | 1 | import { createEvolu, getOrThrow, SimpleName } from "@evolu/common"; |
|
| 2 | 2 | import { evoluReactWebDeps } from "@evolu/react-web"; |
|
| 3 | - | import { Schema } from "./scheme.ts"; |
|
| 3 | + | import { Schema, type RSSFeedId } from "./scheme.ts"; |
|
| 4 | 4 | import { createUseEvolu } from "@evolu/react"; |
|
| 5 | 5 | ||
| 6 | 6 | export const evolu = createEvolu(evoluReactWebDeps)(Schema, { |
|
| 20 | 20 | db |
|
| 21 | 21 | .selectFrom("rssPost") |
|
| 22 | 22 | .selectAll() |
|
| 23 | - | .where("feedId", "=", feedId as any) |
|
| 23 | + | .where("feedId", "=", feedId as RSSFeedId) |
|
| 24 | 24 | .orderBy("id", "desc"), |
|
| 25 | 25 | ); |
|
| 26 | 26 | ||
| 9 | 9 | ||
| 10 | 10 | // RSS Feed ID |
|
| 11 | 11 | const RSSFeedId = id("RSSFeed"); |
|
| 12 | - | type RSSFeedId = typeof RSSFeedId.Type; |
|
| 12 | + | export type RSSFeedId = typeof RSSFeedId.Type; |
|
| 13 | 13 | ||
| 14 | 14 | // RSS Post ID |
|
| 15 | 15 | const RSSPostId = id("RSSPost"); |
|
| 16 | - | type RSSPostId = typeof RSSPostId.Type; |
|
| 16 | + | export type RSSPostId = typeof RSSPostId.Type; |
|
| 17 | 17 | ||
| 18 | 18 | // Custom branded types for string length constraints |
|
| 19 | 19 | const NonEmptyString50 = maxLength(50)(NonEmptyString); |