@duet3d/objectmodel 3.5.0-b1 → 3.5.0-b2

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.
@@ -137,6 +137,14 @@ class ModelObject {
137
137
  console.warn(`Incompatible string target type ${typeof value} for property ${key}`);
138
138
  }
139
139
  }
140
+ else if (propType === "function") {
141
+ if (typeof value === "function") {
142
+ this[ownKey] = value;
143
+ }
144
+ else if (process.env.NODE_ENV !== "production") {
145
+ console.warn(`Incompatible function target type ${typeof value} for property ${key}`);
146
+ }
147
+ }
140
148
  else if (process.env.NODE_ENV !== "production") {
141
149
  console.warn(`Incompatible type ${propType} for property ${key} (${typeof value})`);
142
150
  }
package/dist/index.d.ts CHANGED
@@ -2,7 +2,6 @@ export * from "./ModelCollection";
2
2
  export * from "./ModelDictionary";
3
3
  export * from "./ModelObject";
4
4
  export * from "./boards";
5
- export * from "./state";
6
5
  export * from "./directories";
7
6
  export * from "./fans";
8
7
  export * from "./heat";
@@ -17,6 +16,7 @@ export * from "./plugins";
17
16
  export * from "./scanner";
18
17
  export * from "./sensors";
19
18
  export * from "./spindles";
19
+ export * from "./state";
20
20
  export * from "./tools";
21
21
  export * from "./userSessions";
22
22
  export * from "./volumes";
package/dist/index.js CHANGED
@@ -20,7 +20,6 @@ __exportStar(require("./ModelCollection"), exports);
20
20
  __exportStar(require("./ModelDictionary"), exports);
21
21
  __exportStar(require("./ModelObject"), exports);
22
22
  __exportStar(require("./boards"), exports);
23
- __exportStar(require("./state"), exports);
24
23
  __exportStar(require("./directories"), exports);
25
24
  __exportStar(require("./fans"), exports);
26
25
  __exportStar(require("./heat"), exports);
@@ -35,6 +34,7 @@ __exportStar(require("./plugins"), exports);
35
34
  __exportStar(require("./scanner"), exports);
36
35
  __exportStar(require("./sensors"), exports);
37
36
  __exportStar(require("./spindles"), exports);
37
+ __exportStar(require("./state"), exports);
38
38
  __exportStar(require("./tools"), exports);
39
39
  __exportStar(require("./userSessions"), exports);
40
40
  __exportStar(require("./volumes"), exports);
@@ -46,6 +46,8 @@ exports.default = ObjectModel_1.default;
46
46
  // This will become obsolete as soon as DWC is upgraded to Vue 3, but that isn't going to happen anytime soon.
47
47
  // Until then a Vue 2 user would have to call something like this on initialization to work around this limitation:
48
48
  // globalThis._duetModelSetArray = (array, index, value) => Vue.set(array, index, value);
49
+ // or in TypeScript
50
+ // (globalThis as any)._duetModelSetArray = (array: object, index: string | number, value: any) => Vue.set(array, index, value);
49
51
  globalThis._duetModelSetArray = (array, index, value) => array[index] = value;
50
52
  function setArrayItem(array, index, value) {
51
53
  globalThis._duetModelSetArray(array, index, value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duet3d/objectmodel",
3
- "version": "3.5.0-b1",
3
+ "version": "3.5.0-b2",
4
4
  "description": "TypeScript implementation of the Duet3D Object Model",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",