Skip to content

Commit 1d8a0f8

Browse files
committed
fix: resolve 6 TypeScript errors in app-expo
1 parent 052ebfd commit 1d8a0f8

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

packages/app-expo/src/screens/reader/useReaderBookmark.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* useReaderBookmark — handles bookmark toggling, pending snippet requests, and bookmark list.
33
*/
4-
import { useAnnotationStore } from "@/stores";
4+
import { useAnnotationStore, type AnnotationState } from "@/stores";
55
import { generateId } from "@readany/core/utils";
66
import { useCallback, useMemo, useRef } from "react";
77

@@ -14,8 +14,8 @@ export interface UseReaderBookmarkOptions {
1414

1515
export interface UseReaderBookmarkResult {
1616
isBookmarked: boolean;
17-
bookBookmarks: ReturnType<typeof useAnnotationStore>["bookmarks"];
18-
existingBookmark: ReturnType<typeof useAnnotationStore>["bookmarks"][number] | undefined;
17+
bookBookmarks: AnnotationState["bookmarks"];
18+
existingBookmark: AnnotationState["bookmarks"][number] | undefined;
1919
handleToggleBookmark: () => void;
2020
pendingBookmarkRef: React.RefObject<boolean>;
2121
onBookmarkSnippet: (text: string) => void;

packages/app-expo/src/screens/settings/sync/LanSection.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { type LANQRData, createLANServer } from "@readany/core/sync/lan-backend";
1+
import { type LANQRData, createLANServer } from "@readany/core/sync/lan-server";
2+
import type { ISyncBackend } from "@readany/core/sync/sync-backend";
23
import QRCode from "react-native-qrcode-svg";
34
import { useCallback, useRef, useState } from "react";
45
import { useTranslation } from "react-i18next";
@@ -28,7 +29,7 @@ interface LanSectionProps {
2829
} | null;
2930
pulseAnim: Animated.Value;
3031
progressLabel: () => string | null;
31-
onSyncWithBackend: (backend: unknown) => Promise<{ success: boolean; error?: string } | null>;
32+
onSyncWithBackend: (backend: ISyncBackend) => Promise<{ success: boolean; error?: string } | null>;
3233
}
3334

3435
export function LanSection({
@@ -67,11 +68,11 @@ export function LanSection({
6768
const server = createLANServer({
6869
deviceName,
6970
events: {
70-
onStatusChange: (status) => {
71+
onStatusChange: (status: string) => {
7172
setLanServerStatus(status);
7273
if (status === "error") setShowManualIPInput(true);
7374
},
74-
onError: (err) => {
75+
onError: (err: string) => {
7576
setLanError(err);
7677
setShowManualIPInput(true);
7778
},

0 commit comments

Comments
 (0)