Open jonath92 opened 2 years ago
It is a minor issue but worth to fix at some time in future:
Currently the types don't prevent me to write something like this:
const { Label } = imports.gi.St const { Text } = imports.gi.Clutter const label = new Label({ visible: false, clutter_text: new Text({ use_markup: true }) })
This is wrong because clutter_text is readonly. GJS is throwing the following error: [radio@driglu4it]: Property StLabel.clutter-text is not writable.
clutter_text
[radio@driglu4it]: Property StLabel.clutter-text is not writable
I haven't tested if this also effects other classes but as the types are auto generated I guess this to be the case.
Yeah, I had the assumption readonly props can be modified at init, but it's probably not the case.
I can change it, but it would be nice to confirm it with other readonly props/classes
It is a minor issue but worth to fix at some time in future:
Currently the types don't prevent me to write something like this:
This is wrong because
clutter_text
is readonly. GJS is throwing the following error:[radio@driglu4it]: Property StLabel.clutter-text is not writable
.I haven't tested if this also effects other classes but as the types are auto generated I guess this to be the case.