Skip to content

Commit

Permalink
home: Suppress unuseful TypeScript warnings and errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ThrRip committed Dec 18, 2023
1 parent 2f6ab18 commit 7b33f43
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/home/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,11 @@ type Playlist = Array<Song>
const { data: backendPlaylistFetchResponse } = await useAsyncData<Playlist>(
'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<Playlist>(backendPlaylistFetchResponse.value ?? [])
// View
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7b33f43

Please sign in to comment.