fix: type errors
* fix app.tsx * fix InfoItem * fix helpers * fix webview ref * fix MoreScreen * fix NovelScreenButtonGroup * fix ReaderScreen * fix readerTextAlignSelector * fix ReaderValueChange * fix UpdateNovelCard * fix myAnimeList * fixed legacy backup * fix migrateNovel
This commit is contained in:
@@ -78,11 +78,14 @@ export const getNovelById = async (novelId: number) => {
|
||||
export const getNovelByPath = (
|
||||
novelPath: string,
|
||||
pluginId: string,
|
||||
): NovelInfo | null => {
|
||||
): NovelInfo | undefined => {
|
||||
const res = getFirstSync<NovelInfo>([
|
||||
'SELECT * FROM Novel WHERE path = ? AND pluginId = ?',
|
||||
[novelPath, pluginId],
|
||||
]);
|
||||
if (!res) {
|
||||
return undefined;
|
||||
}
|
||||
return res;
|
||||
};
|
||||
|
||||
|
||||
@@ -90,7 +90,8 @@ export function getFirstSync<T = unknown>(queryObject: QueryObject<T>) {
|
||||
return defaultQuerySync<T, false>('getFirstSync', queryObject, null);
|
||||
}
|
||||
|
||||
type TransactionObject = [query, ...params: SQLiteBindValue[]];
|
||||
type params = SQLiteBindValue[];
|
||||
type TransactionObject = [query, ...params];
|
||||
|
||||
export async function transactionAsync(transactionObject: TransactionObject[]) {
|
||||
await db.withTransactionAsync(async () => {
|
||||
|
||||
Reference in New Issue
Block a user