ohctechv3/.svn/pristine/41/41314d54bb058ffcefc4bafe485941d81310535f.svn-base
2024-10-28 15:03:36 +05:30

30 lines
907 B
Plaintext

import { ComponentMeta, ControllerMeta } from "../context/context";
import { RowModelType } from "./iRowModel";
export type ModuleValidationValidResult = {
isValid: true;
};
export type ModuleValidationInvalidResult = {
isValid: false;
message: string;
};
export type ModuleValidationResult = ModuleValidationValidResult | ModuleValidationInvalidResult;
export interface Module {
version: string;
/**
* Validation run when registering the module
*
* @return Whether the module is valid or not. If not, a message explaining why it is not valid
*/
validate?: () => ModuleValidationResult;
moduleName: string;
beans?: any[];
agStackComponents?: ComponentMeta[];
controllers?: ControllerMeta[];
userComponents?: {
componentName: string;
componentClass: any;
}[];
rowModel?: RowModelType;
dependantModules?: Module[];
}