import type { AgMaybePromise } from './agMaybePromise'; export interface AgTypeScriptComponent { /** Return the DOM element of your component, this is what Studio puts into the DOM */ getGui(): HTMLElement; /** Gets called once by Studio when the component is being removed; if your component needs to do any cleanup, do it here */ destroy?(): void; /** Called once on init. */ init?(params: TParams): AgMaybePromise; /** Called for every subsequent params update. */ refresh?(params: TParams): AgMaybePromise; } export interface AgCustomComponentType { name: string; mandatoryMethods?: (keyof TComp & string)[]; optionalMethods?: (keyof TComp & string)[]; }