home-assistant-javascript-templates 5.7.0 → 5.7.1

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.
@@ -40,9 +40,10 @@ interface Hass {
40
40
  interface HomeAssistant extends HTMLElement {
41
41
  hass: Hass;
42
42
  }
43
+ type CancelSubscription = () => Promise<void>;
43
44
  interface HassConnection {
44
45
  conn: {
45
- subscribeMessage: <T>(callback: (response: T) => void, options: Vars) => void;
46
+ subscribeMessage: <T>(callback: (response: T) => void, options: Vars) => Promise<CancelSubscription>;
46
47
  };
47
48
  }
48
49
  declare global {
package/dist/index.d.ts CHANGED
@@ -40,9 +40,10 @@ interface Hass {
40
40
  interface HomeAssistant extends HTMLElement {
41
41
  hass: Hass;
42
42
  }
43
+ type CancelSubscription = () => Promise<void>;
43
44
  interface HassConnection {
44
45
  conn: {
45
- subscribeMessage: <T>(callback: (response: T) => void, options: Vars) => void;
46
+ subscribeMessage: <T>(callback: (response: T) => void, options: Vars) => Promise<CancelSubscription>;
46
47
  };
47
48
  }
48
49
  declare global {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "home-assistant-javascript-templates",
3
- "version": "5.7.0",
3
+ "version": "5.7.1",
4
4
  "description": "A JavaScript utility to render Home Assistant JavaScript templates",
5
5
  "keywords": [
6
6
  "home-assistant",
@@ -47,14 +47,14 @@
47
47
  "devDependencies": {
48
48
  "@rollup/plugin-terser": "^0.4.4",
49
49
  "@types/jest": "^29.5.14",
50
- "@types/node": "^22.13.10",
50
+ "@types/node": "^22.13.14",
51
51
  "get-promisable-result": "^1.0.1",
52
52
  "jest": "^29.7.0",
53
53
  "jest-environment-jsdom": "^29.7.0",
54
54
  "jest-location-mock": "^2.0.0",
55
- "rollup": "^4.35.0",
55
+ "rollup": "^4.38.0",
56
56
  "rollup-plugin-ts": "^3.4.5",
57
- "ts-jest": "^29.2.6",
57
+ "ts-jest": "^29.3.0",
58
58
  "tslib": "^2.8.1",
59
59
  "typescript": "^5.8.2"
60
60
  },