@duet3d/objectmodel 3.5.3 → 3.5.5
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.
|
@@ -3,7 +3,9 @@ import { IModelObject } from "./ModelObject";
|
|
|
3
3
|
* Class for storing model object items in an array
|
|
4
4
|
*/
|
|
5
5
|
export declare class ModelCollection<T extends IModelObject | null> extends Array<T> implements IModelObject {
|
|
6
|
-
|
|
6
|
+
readonly itemConstructor: {
|
|
7
|
+
new (): T;
|
|
8
|
+
};
|
|
7
9
|
/**
|
|
8
10
|
* Constructor of this class
|
|
9
11
|
* @param itemConstructor Item constructor type that items must derive from
|
|
@@ -3,8 +3,10 @@ import { IModelObject } from "./ModelObject";
|
|
|
3
3
|
* Dictionary class to map object model data
|
|
4
4
|
*/
|
|
5
5
|
export declare class ModelDictionary<T> extends Map<string, T | null> implements IModelObject {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
readonly nullDeletesKeys: boolean;
|
|
7
|
+
readonly itemConstructor: {
|
|
8
|
+
new (): T;
|
|
9
|
+
} | null;
|
|
8
10
|
/**
|
|
9
11
|
* Constructor of this class
|
|
10
12
|
* @param nullDeletesKeys Whether setting null to items effectively deletes them
|
package/dist/ModelDictionary.js
CHANGED
|
@@ -14,8 +14,8 @@ class ModelDictionary extends Map {
|
|
|
14
14
|
*/
|
|
15
15
|
constructor(nullDeletesKeys, itemConstructor = null) {
|
|
16
16
|
super();
|
|
17
|
-
this.itemConstructor = itemConstructor;
|
|
18
17
|
this.nullDeletesKeys = nullDeletesKeys;
|
|
18
|
+
this.itemConstructor = itemConstructor;
|
|
19
19
|
Object.setPrototypeOf(this, ModelDictionary.prototype);
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
@@ -10,8 +10,8 @@ export declare enum AnalogSensorType {
|
|
|
10
10
|
dht22 = "dht22",
|
|
11
11
|
dhtHumidity = "dhthumidity",
|
|
12
12
|
bme280 = "bme280",
|
|
13
|
-
bme280pressure = "
|
|
14
|
-
bme280humidity = "
|
|
13
|
+
bme280pressure = "bmepressure",
|
|
14
|
+
bme280humidity = "bmehumidity",
|
|
15
15
|
currentLoop = "currentloooppyro",
|
|
16
16
|
mcuTemp = "mcutemp",
|
|
17
17
|
drivers = "drivers",
|
|
@@ -14,8 +14,8 @@ var AnalogSensorType;
|
|
|
14
14
|
AnalogSensorType["dht22"] = "dht22";
|
|
15
15
|
AnalogSensorType["dhtHumidity"] = "dhthumidity";
|
|
16
16
|
AnalogSensorType["bme280"] = "bme280";
|
|
17
|
-
AnalogSensorType["bme280pressure"] = "
|
|
18
|
-
AnalogSensorType["bme280humidity"] = "
|
|
17
|
+
AnalogSensorType["bme280pressure"] = "bmepressure";
|
|
18
|
+
AnalogSensorType["bme280humidity"] = "bmehumidity";
|
|
19
19
|
AnalogSensorType["currentLoop"] = "currentloooppyro";
|
|
20
20
|
AnalogSensorType["mcuTemp"] = "mcutemp";
|
|
21
21
|
AnalogSensorType["drivers"] = "drivers";
|