Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
"terser-webpack-plugin": "^5.1.1",
"ts-lit-plugin": "^1.2.1",
"ts-mocha": "^7.0.0",
"typescript": "^4.0.3",
"typescript": "^4.2.4",
"vinyl-buffer": "^1.0.1",
"vinyl-source-stream": "^2.0.0",
"webpack": "^5.24.1",
Expand Down
2 changes: 1 addition & 1 deletion src/cast/receiver_messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const ensureConnectedCastSession = (cast: CastManager, auth: Auth) => {
return undefined;
}

return new Promise((resolve) => {
return new Promise<void>((resolve) => {
const unsub = cast.addEventListener("connection-changed", () => {
if (cast.castConnectedToOurHass) {
unsub();
Expand Down
2 changes: 1 addition & 1 deletion src/common/util/render-status.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const afterNextRender = (cb: () => void): void => {
export const afterNextRender = (cb: (value: unknown) => void): void => {
requestAnimationFrame(() => setTimeout(cb, 0));
};

Expand Down
2 changes: 1 addition & 1 deletion src/panels/config/cloud/ha-config-cloud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class HaConfigCloud extends HassRouterPage {

private _resolveCloudStatusLoaded!: () => void;

private _cloudStatusLoaded = new Promise((resolve) => {
private _cloudStatusLoaded = new Promise<void>((resolve) => {
this._resolveCloudStatusLoaded = resolve;
});

Expand Down
2 changes: 1 addition & 1 deletion src/panels/config/devices/ha-config-device-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ export class HaConfigDevicePage extends LitElement {
}

if (!newName && !newEntityId) {
return new Promise((resolve) => resolve());
return undefined;
}

return updateEntityRegistryEntry(this.hass!, entity.entity_id, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ class ZHADeviceCard extends SubscribeMixin(LitElement) {
}

if (!newName && !newEntityId) {
return new Promise((resolve) => resolve());
return undefined;
}

return updateEntityRegistryEntry(this.hass!, entity.entity_id, {
Expand Down
2 changes: 2 additions & 0 deletions src/state/haptic-mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export const hapticMixin = <T extends Constructor<HassBaseEl>>(superClass: T) =>
super.firstUpdated(changedProps);
this.addEventListener("hass-vibrate", (ev) => {
const vibrate = ev.detail.vibrate;
// @ts-expect-error not all browsers support vibrate
if (navigator.vibrate && vibrate) {
window.addEventListener("haptic", handleHaptic);
} else {
Expand All @@ -52,6 +53,7 @@ export const hapticMixin = <T extends Constructor<HassBaseEl>>(superClass: T) =>

protected hassConnected() {
super.hassConnected();
// @ts-expect-error not all browsers support vibrate
if (navigator.vibrate && this.hass!.vibrate) {
window.addEventListener("haptic", handleHaptic);
}
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13473,10 +13473,10 @@ typescript@^3.8.3:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061"
integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==

typescript@^4.0.3:
version "4.0.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.3.tgz#153bbd468ef07725c1df9c77e8b453f8d36abba5"
integrity sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg==
typescript@^4.2.4:
version "4.2.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.4.tgz#8610b59747de028fda898a8aef0e103f156d0961"
integrity sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==

typical@^4.0.0:
version "4.0.0"
Expand Down