Skip to content

Commit

Permalink
fix: type definition errors
Browse files Browse the repository at this point in the history
  • Loading branch information
lgou2w committed Feb 6, 2023
1 parent 34a4018 commit 8957646
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions src/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export interface Comic {
categories: string[]
thumb: ImageMedia
likesCount: number
id?: string
}

export type UserFavouriteResponse = BaseResponse<{
Expand All @@ -96,7 +97,7 @@ export type UserFavouriteResponse = BaseResponse<{
}>

export interface Category {
_id: string
_id?: string
title: string
thumb: ImageMedia
isWeb?: boolean
Expand All @@ -116,16 +117,31 @@ export interface ComicsPayload {

export type ComicsResponse = BaseResponse<{
comics: {
docs: (Comic & { id: string })[]
docs: Comic[]
total: number
limit: number
page: number
pages: number
}
}>

export interface Creator {
_id: string
gender: string
name: string
slogan?: string
title?: string
verified?: boolean
exp: number
level: number
characters: string[]
character?: string
role?: string
avatar?: ImageMedia
}

export interface ComicDetail extends Comic {
_creator: Omit<User, 'birthday' | 'email' | 'created_at' | 'isPunched'>
_creator: Creator
chineseTeam: string
description?: string
tags: string[]
Expand Down Expand Up @@ -197,7 +213,7 @@ export interface ComicCommentsPayload extends ComicIdPayload {

export interface ComicComment {
_id: string
_user: Omit<User, 'birthday' | 'email' | 'created_at' | 'isPunched'>
_user: Creator
_comic: string
content: string
isTop: boolean
Expand All @@ -224,13 +240,13 @@ export interface SearchedComic {
_id: string
title: string
author?: string
totalViews: number
totalLikes: number
totalViews?: number
totalLikes?: number
likesCount: number
finished: boolean
categories: string[]
thumb: ImageMedia
chineseTeam: string
chineseTeam?: string
description?: string
tags: string[]
updated_at: string
Expand Down

0 comments on commit 8957646

Please sign in to comment.