Skip to content

Commit

Permalink
fix: 修复 types 是否必须
Browse files Browse the repository at this point in the history
  • Loading branch information
jimczj committed Oct 24, 2018
1 parent 3110686 commit f836ab3
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion @types/checkbox.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export interface AtCheckboxProps<T> {

selectedList: Array<T>

onChange?: (selectedList: Array<T>) => void
onChange: (selectedList: Array<T>) => void
}

declare const AtCheckbox: ComponentClass<AtCheckboxProps<any>>
Expand Down
2 changes: 1 addition & 1 deletion @types/input-number.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface AtInputNumberProps extends AtComponent{

disabled?: boolean

onChange?: (value: number) => void
onChange: (value: number) => void
}

declare const AtInputNumber: ComponentClass<AtInputNumberProps>
Expand Down
2 changes: 1 addition & 1 deletion @types/input.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export interface AtInputProps extends AtComponent{

onFocus?: InputFunction

onChange?: InputFunction
onChange: InputFunction

onConfirm?: InputFunction

Expand Down
4 changes: 2 additions & 2 deletions @types/radio.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ export interface Option<T> {
export interface AtRadioProps<T> {
style?: string

value?: T
value: T

options: Array<Option<T>>

onClick?: (vaule: T, event: BaseEvent) => void
onClick: (vaule: T, event: BaseEvent) => void
}

declare const AtRadio: ComponentClass<AtRadioProps<any>>
Expand Down
2 changes: 1 addition & 1 deletion @types/search-bar.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface AtSearchBarProps extends AtComponent {

actionName?: string

onChange?: (value: string, event: BaseEvent) => void
onChange: (value: string, event: BaseEvent) => void

onFocus?: BaseEventFunction

Expand Down
4 changes: 2 additions & 2 deletions @types/segmented-control.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import AtComponent from './base'
export interface AtSegmentedControlProps extends AtComponent{
style?: string

current?: number
current: number

color?: string

Expand All @@ -18,7 +18,7 @@ export interface AtSegmentedControlProps extends AtComponent{

values: string[]

onClick?: (index: number, BaseEvent) => void
onClick: (index: number, BaseEvent) => void
}

declare const AtSegmentedControl: ComponentClass<AtSegmentedControlProps>
Expand Down
4 changes: 2 additions & 2 deletions @types/tab-bar.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface AtTabBarProps extends AtComponent{

backgroundColor?: string

current?: number
current: number

iconSize?: number

Expand All @@ -32,7 +32,7 @@ export interface AtTabBarProps extends AtComponent{

tabList: TabItem[]

onClick?: (index: number, event: BaseEvent) => void
onClick: (index: number, event: BaseEvent) => void
}

declare const AtTabBar: ComponentClass<AtTabBarProps>
Expand Down
4 changes: 2 additions & 2 deletions @types/tabs-pane.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import AtComponent from './base'
export interface AtTabsPaneProps extends AtComponent{
tabDirection?: 'horizontal' | 'vertical'

current?: number
current: number

index?: number
index: number
}

declare const AtTabsPane: ComponentClass<AtTabsPaneProps>
Expand Down
4 changes: 2 additions & 2 deletions @types/tabs.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface AtTabsProps extends AtComponent{

height?: string

current?: number
current: number

scroll?: boolean

Expand All @@ -18,7 +18,7 @@ export interface AtTabsProps extends AtComponent{

tabList: Array<{ title: string }>

onClick?: (index: number, event: BaseEvent) => void
onClick: (index: number, event: BaseEvent) => void
}

declare const AtTabs: ComponentClass<AtTabsProps>
Expand Down

0 comments on commit f836ab3

Please sign in to comment.