AlCalzone/virtual-tsc

Update StateQuality

Closed this issue · 1 comments

The values for StateQuality in test/ioBroker.d.ts seem outdated, for example, one could receive the following TypeScript error:

Type '64' is not assignable to type 'StateQuality | undefined'.

I think the values in

enum StateQuality {
good = 0x00, // or undefined or null
bad = 0x01,
general_problem = 0x01,
general_device_problem = 0x41,
general_sensor_problem = 0x81,
device_not_connected = 0x42,
sensor_not_connected = 0x82,
device_reports_error = 0x44,
sensor_reports_error = 0x84,
}

shall be updated with values from

https://github.com/ioBroker/ioBroker.docs/blob/6cf3906bc43bd3b31821902c78abd8babe4f93d3/docs/en/dev/objectsschema.md?plain=1#L133-L153

As an example, I had to ignore the TS errors like this jpawlowski/ioBroker.residents@71d2e5d

You're looking for the js-controller repo. This file you referenced is just a test for the compiler.