You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Widget properties like e.g. left and height are exposed as class fields in the Tabris.js typings. However, at runtime, they are actually defined as accessors.
While it was possible to define property accessors in custom widgets that override Tabris.js widget properties in TypeScript 3.x, this does not work anymore since TypeScript 4.x. Since TypeScript 4.x, it is forbidden to override class fields using accessors (makes sense, because this does not work at runtime), which prevents customizing the behavior of Tabris.js properties in custom widgets:
classCustomWidgetextendsComposite{setheight(value: number){// 'height' is defined as a property in class 'Composite<Widget<any>>', but is overridden here in 'CustomWidget' as an accessor.ts(2611)super.height=value;}getheight(){returnsuper.height;}}
Expected behavior
Tabris.js properties that are accessors at runtime should be defined as accessors in the typings as well.
Environment
Tabris.js version: 3.9.0
The text was updated successfully, but these errors were encountered:
Problem description
Widget properties like e.g.
left
andheight
are exposed as class fields in the Tabris.js typings. However, at runtime, they are actually defined as accessors.While it was possible to define property accessors in custom widgets that override Tabris.js widget properties in TypeScript 3.x, this does not work anymore since TypeScript 4.x. Since TypeScript 4.x, it is forbidden to override class fields using accessors (makes sense, because this does not work at runtime), which prevents customizing the behavior of Tabris.js properties in custom widgets:
Expected behavior
Tabris.js properties that are accessors at runtime should be defined as accessors in the typings as well.
Environment
The text was updated successfully, but these errors were encountered: