File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -9,12 +9,12 @@ export type SettingListItemOptions = ThisType<SettingListItem> &
9
9
/**
10
10
* Will be invoked when the user checks the checkbox.
11
11
*/
12
- readonly onCheck ?: ( isBatchProcess ?: boolean ) => void ;
12
+ readonly onCheck ?: ( isBatchProcess ?: boolean ) => void | Promise < void > ;
13
13
14
14
/**
15
15
* Will be invoked when the user unchecks the checkbox.
16
16
*/
17
- readonly onUnCheck ?: ( isBatchProcess ?: boolean ) => void ;
17
+ readonly onUnCheck ?: ( isBatchProcess ?: boolean ) => void | Promise < void > ;
18
18
19
19
/**
20
20
* Should the user be prevented from changing the value of the input?
Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ import { TriggerButton } from "./buttons/TriggerButton.js";
8
8
9
9
export type SettingTriggerListItemOptions = ThisType < SettingTriggerListItem > &
10
10
SettingListItemOptions & {
11
- readonly onRefreshTrigger ?: ( ) => unknown | Promise < unknown > ;
12
- readonly onSetTrigger : ( ) => unknown | Promise < unknown > ;
11
+ readonly onRefreshTrigger ?: ( ) => void | Promise < void > ;
12
+ readonly onSetTrigger : ( ) => void | Promise < void > ;
13
13
} ;
14
14
15
15
export class SettingTriggerListItem extends SettingListItem {
Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ export type UiComponentInterface = EventTarget & {
9
9
10
10
export type UiComponentOptions = {
11
11
readonly children ?: Array < UiComponentInterface > ;
12
- readonly onClick ?: ( event ?: MouseEvent ) => void ;
13
- readonly onRefresh ?: ( ) => void ;
12
+ readonly onClick ?: ( event ?: MouseEvent ) => void | Promise < void > ;
13
+ readonly onRefresh ?: ( ) => void | Promise < void > ;
14
14
} ;
15
15
16
16
export abstract class UiComponent extends EventTarget implements UiComponentInterface {
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export type TriggerButtonBehavior = "integer" | "percentage";
14
14
15
15
export type TriggerButtonOptions = ThisType < TriggerButton > &
16
16
ButtonOptions & {
17
- readonly onRefreshTitle ?: ( ) => void ;
17
+ readonly onRefreshTitle ?: ( ) => void | Promise < void > ;
18
18
} ;
19
19
20
20
export class TriggerButton extends Button {
You can’t perform that action at this time.
0 commit comments