@mirta/globals 0.2.6 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mirta/globals",
3
3
  "description": "Complete set of types for wb-rule development in TypeScript",
4
- "version": "0.2.6",
4
+ "version": "0.3.0",
5
5
  "license": "Unlicense",
6
6
  "keywords": [
7
7
  "mirta",
@@ -31,8 +31,5 @@
31
31
  },
32
32
  "bugs": {
33
33
  "url": "https://github.com/wb-mirta/core/issues"
34
- },
35
- "publishConfig": {
36
- "access": "public"
37
34
  }
38
35
  }
@@ -197,7 +197,18 @@ declare namespace WbRules {
197
197
 
198
198
  setMin(min: number): void
199
199
 
200
- setError(order: number): void
200
+ setPrecision(precision: number): void
201
+
202
+ /**
203
+ * Позволяет указать на наличие ошибки уровня контрола.
204
+ * Применимо только к виртуальным устройствам.
205
+ *
206
+ * @param message Текст ошибки.
207
+ *
208
+ **/
209
+ setError(message: string): void
210
+
211
+ setOrder(order: number): void
201
212
 
202
213
  setValue(value: MqttValue | ControlValueOptions): void
203
214
 
@@ -221,6 +232,13 @@ declare namespace WbRules {
221
232
 
222
233
  getMin(): number
223
234
 
235
+ getPrecision(): number
236
+
237
+ /**
238
+ * Возвращает текст ошибки,
239
+ * а при её отсутствии - пустую строку.
240
+ *
241
+ **/
224
242
  getError(): string
225
243
 
226
244
  getOrder(): number
@@ -385,6 +403,22 @@ declare namespace WbRules {
385
403
  controlsList(): Control[]
386
404
 
387
405
  isVirtual(): boolean
406
+
407
+ /**
408
+ * Позволяет указать на наличие ошибки уровня устройства.
409
+ * Применимо только к виртуальным устройствам.
410
+ *
411
+ * @param message Текст ошибки.
412
+ *
413
+ **/
414
+ setError(message: string): void
415
+
416
+ /**
417
+ * Возвращает текст ошибки,
418
+ * а при её отсутствии - пустую строку.
419
+ *
420
+ **/
421
+ getError(): string
388
422
  }
389
423
 
390
424
  type ControlOptionsTree = Record<string, ControlOptions>