In some scenario, addProperty does not send correct data to DBus. For example, in bluez api, ManufacturerData's dict key must be uint16), but JS does not support number-type key. Sinceout value was forced to set to Utils.Define('Auto', 'value') in when implementing org.freedesktop.DBus.Properties, the returned value's prop_key was mis-transformed to string.
This PR introduced function support when defining method, so value type could be dynamic returned according args.
In some scenario, addProperty does not send correct data to
DBus
. For example, in bluez api, ManufacturerData's dict key must be uint16), but JS does not support number-type key. Sinceout
value was forced to set toUtils.Define('Auto', 'value')
in when implementingorg.freedesktop.DBus.Properties
, the returned value'sprop_key
was mis-transformed tostring
.This PR introduced function support when defining method, so value type could be dynamic returned according args.