Gr3q / types-cjs

Typescript declarations for CJS - Cinnamon JavaScript
MIT License
5 stars 2 forks source link

Why does connecting to a Property Change Notification requires a number as return type? #6

Closed jonath92 closed 2 years ago

jonath92 commented 2 years ago

Currently you must return a number when connecting to a property change with notify::[property]:

widget.connect('notify::hover, () => {
   widget.change_style_pseudo_class('active', widget.hover)
   return 1 // why this line needed?
)

In the tutorial they are returning nothing: https://gjs.guide/guides/gobject/basics.html#property-change-notification ...

Gr3q commented 2 years ago

Yeah, I already commented on your PR, it is a mistake (typo) on my part, I will fix this tomorrow.

jonath92 commented 2 years ago

close as fixed