From 7b33f4344de283034373c5956b2b646629ea34a0 Mon Sep 17 00:00:00 2001 From: ThrRip Date: Mon, 18 Dec 2023 15:05:09 +0800 Subject: [PATCH] home: Suppress unuseful TypeScript warnings and errors --- packages/home/app.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/home/app.vue b/packages/home/app.vue index 59c3264..d2feaf9 100644 --- a/packages/home/app.vue +++ b/packages/home/app.vue @@ -343,9 +343,11 @@ type Playlist = Array const { data: backendPlaylistFetchResponse } = await useAsyncData( 'backend-databases-home-playlist', + // @ts-ignore () => backendDatabases.listDocuments('home', 'playlist', [Query.limit(useAppConfig().backendQueryResultsLimit)]), { transform: (res: { total: number, documents: Playlist }): Playlist => res.documents } ) +// @ts-ignore const backendPlaylist = ref(backendPlaylistFetchResponse.value ?? []) // View @@ -423,7 +425,9 @@ function viewPlaylistDataUpdate (tasks: Array<'shuffle' | 'sort'>) { if (viewPlaylistSortingColumn.value === 'name' || viewPlaylistSortingColumn.value === 'artist') { const pinyinPro = await import('pinyin-pro') playlist.map((song) => { + // @ts-ignore song[`${viewPlaylistSortingColumn.value}Pinyin`] = + // @ts-ignore pinyinPro.pinyin(song[viewPlaylistSortingColumn.value], { toneType: 'none', nonZh: 'consecutive' }) .replaceAll(' ', '') return song