[TS] Remove IBaseWidget.element prop (#741)

Remove the prop as it is a impl detail of the frontend.
This commit is contained in:
Chenlei Hu
2025-03-10 14:34:09 -04:00
committed by GitHub
parent db680c96ad
commit 214defbdb4

View File

@@ -122,13 +122,9 @@ export interface IMultilineStringWidget<TElement extends HTMLElement = HTMLTextA
}
/** A custom widget - accepts any value and has no built-in special handling */
export interface ICustomWidget<TElement extends HTMLElement = HTMLElement> extends
IBaseWidget<TElement> {
export interface ICustomWidget extends IBaseWidget {
type?: "custom"
value: string | object
element?: TElement
}
/**
@@ -143,7 +139,7 @@ export type TWidgetValue = IWidget["value"]
* The base type for all widgets. Should not be implemented directly.
* @see IWidget
*/
export interface IBaseWidget<TElement extends HTMLElement = HTMLElement> {
export interface IBaseWidget {
linkedWidgets?: IWidget[]
name: string
@@ -180,9 +176,6 @@ export interface IBaseWidget<TElement extends HTMLElement = HTMLElement> {
tooltip?: string
/** HTML widget element */
element?: TElement
// TODO: Confirm this format
callback?(
value: any,