将提供默认值的参数改为可选

This commit is contained in:
YXL 2020-09-13 12:57:33 +08:00
parent 19f71cfd62
commit 92612bc4fe
8 changed files with 9 additions and 9 deletions

View File

@ -1,7 +1,7 @@
import { RequestBaseConfig } from './base'
export interface AlbumSongSaleBoardRequestConfig extends RequestBaseConfig {
albumType: 0 | 1 // 0 为数字专辑,1 为数字单曲
type: 'daily' | 'week' | 'year' | 'total'
albumType?: 0 | 1 // 0 为数字专辑,1 为数字单曲
type?: 'daily' | 'week' | 'year' | 'total'
year?: string | number // 年份,默认本年。 type 为 year 时有效
}

View File

@ -1,5 +1,5 @@
import { RequestBaseConfig } from './base'
export interface BannerRequestConfig extends RequestBaseConfig {
type: 0 | 1 | 2 | 3
type?: 0 | 1 | 2 | 3
}

View File

@ -2,7 +2,7 @@ import { RequestBaseConfig } from './base'
export interface CloudSearchRequestConfig extends RequestBaseConfig {
keywords: string
type: 1 | 10 | 100 | 1000 | 1002 | 1004 | 1006 | 1009 | 1014
type?: 1 | 10 | 100 | 1000 | 1002 | 1004 | 1006 | 1009 | 1014
limit?: string | number
offset?: string | number
}

View File

@ -1,5 +1,5 @@
import { RequestBaseConfig } from './base'
export interface DailySigninRequestConfig extends RequestBaseConfig {
type: 0 | 1
type?: 0 | 1
}

View File

@ -1,7 +1,7 @@
import { RequestBaseConfig } from './base'
export interface DjToplistRequestConfig extends RequestBaseConfig {
type: 'new' | 'hot'
type?: 'new' | 'hot'
limit?: string | number
offset?: string | number
}

View File

@ -1,5 +1,5 @@
import { RequestBaseConfig } from './base'
export interface HomepageBlockPageRequestConfig extends RequestBaseConfig {
refresh: 'true' | 'false'
refresh?: 'true' | 'false' | boolean
}

View File

@ -1,5 +1,5 @@
import { RequestBaseConfig } from './base'
export interface PlaylistOrderUpdateRequestConfig extends RequestBaseConfig {
ids?: string
ids: string
}

View File

@ -2,5 +2,5 @@ import { RequestBaseConfig } from './base'
export interface UserRecordRequestConfig extends RequestBaseConfig {
uid: string | number
type: 1 | 0
type?: 1 | 0
}