Convert ModelView validate to Promise (#13390)

* Convert ModelView validate to Promise

* more cleanup
This commit is contained in:
Charles Gagnon
2020-11-13 15:31:22 -08:00
committed by GitHub
parent 76781d6cf4
commit af55dcfb42
11 changed files with 48 additions and 68 deletions

View File

@@ -99,7 +99,7 @@ export interface IComponent extends IDisposable {
setProperties?: (properties: { [key: string]: any; }) => void;
enabled: boolean;
readonly valid?: boolean;
validate(): Thenable<boolean>;
validate(): Promise<boolean>;
setDataProvider(handle: number, componentId: string, context: any): void;
refreshDataProvider(item: any): void;
focus(): void;

View File

@@ -42,7 +42,7 @@ export interface IModelView extends IView {
refreshDataProvider(componentId: string, item: any): void;
registerEvent(componentId: string, initial?: boolean): void;
onEvent: Event<IModelViewEventArgs>;
validate(componentId: string): Thenable<boolean>;
validate(componentId: string): Promise<boolean>;
readonly onDestroy: Event<void>;
focus(componentId: string): void;
doAction(componentId: string, action: string, ...args: any[]): void;