[TS] Remove optional from widget y and type (#752)

- Fixes widget `type` marked as optional - it is required
- Fixes widget `y` marked as optional - now initialised to 0
This commit is contained in:
filtered
2025-03-12 02:46:10 +11:00
committed by GitHub
parent f6c605434b
commit a7f2ff16a9
4 changed files with 15 additions and 22 deletions

View File

@@ -10,9 +10,9 @@ export abstract class BaseWidget implements IBaseWidget {
name: string
options: IWidgetOptions<unknown>
label?: string
type?: TWidgetType
type: TWidgetType
value?: TWidgetValue
y?: number
y: number = 0
last_y?: number
width?: number
disabled?: boolean
@@ -42,6 +42,7 @@ export abstract class BaseWidget implements IBaseWidget {
Object.assign(this, widget)
this.name = widget.name
this.options = widget.options
this.type = widget.type
}
get outline_color() {