mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 09:16:38 +00:00
Bump typescript to 4.2.4 (#8876)
This commit is contained in:
parent
b8bb0c038d
commit
a43120320e
@ -227,7 +227,7 @@
|
|||||||
"terser-webpack-plugin": "^5.1.1",
|
"terser-webpack-plugin": "^5.1.1",
|
||||||
"ts-lit-plugin": "^1.2.1",
|
"ts-lit-plugin": "^1.2.1",
|
||||||
"ts-mocha": "^7.0.0",
|
"ts-mocha": "^7.0.0",
|
||||||
"typescript": "^4.0.3",
|
"typescript": "^4.2.4",
|
||||||
"vinyl-buffer": "^1.0.1",
|
"vinyl-buffer": "^1.0.1",
|
||||||
"vinyl-source-stream": "^2.0.0",
|
"vinyl-source-stream": "^2.0.0",
|
||||||
"webpack": "^5.24.1",
|
"webpack": "^5.24.1",
|
||||||
|
@ -62,7 +62,7 @@ export const ensureConnectedCastSession = (cast: CastManager, auth: Auth) => {
|
|||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Promise((resolve) => {
|
return new Promise<void>((resolve) => {
|
||||||
const unsub = cast.addEventListener("connection-changed", () => {
|
const unsub = cast.addEventListener("connection-changed", () => {
|
||||||
if (cast.castConnectedToOurHass) {
|
if (cast.castConnectedToOurHass) {
|
||||||
unsub();
|
unsub();
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
export const afterNextRender = (cb: () => void): void => {
|
export const afterNextRender = (cb: (value: unknown) => void): void => {
|
||||||
requestAnimationFrame(() => setTimeout(cb, 0));
|
requestAnimationFrame(() => setTimeout(cb, 0));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ class HaConfigCloud extends HassRouterPage {
|
|||||||
|
|
||||||
private _resolveCloudStatusLoaded!: () => void;
|
private _resolveCloudStatusLoaded!: () => void;
|
||||||
|
|
||||||
private _cloudStatusLoaded = new Promise((resolve) => {
|
private _cloudStatusLoaded = new Promise<void>((resolve) => {
|
||||||
this._resolveCloudStatusLoaded = resolve;
|
this._resolveCloudStatusLoaded = resolve;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -728,7 +728,7 @@ export class HaConfigDevicePage extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!newName && !newEntityId) {
|
if (!newName && !newEntityId) {
|
||||||
return new Promise((resolve) => resolve());
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
return updateEntityRegistryEntry(this.hass!, entity.entity_id, {
|
return updateEntityRegistryEntry(this.hass!, entity.entity_id, {
|
||||||
|
@ -159,7 +159,7 @@ class ZHADeviceCard extends SubscribeMixin(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!newName && !newEntityId) {
|
if (!newName && !newEntityId) {
|
||||||
return new Promise((resolve) => resolve());
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
return updateEntityRegistryEntry(this.hass!, entity.entity_id, {
|
return updateEntityRegistryEntry(this.hass!, entity.entity_id, {
|
||||||
|
@ -40,6 +40,7 @@ export const hapticMixin = <T extends Constructor<HassBaseEl>>(superClass: T) =>
|
|||||||
super.firstUpdated(changedProps);
|
super.firstUpdated(changedProps);
|
||||||
this.addEventListener("hass-vibrate", (ev) => {
|
this.addEventListener("hass-vibrate", (ev) => {
|
||||||
const vibrate = ev.detail.vibrate;
|
const vibrate = ev.detail.vibrate;
|
||||||
|
// @ts-expect-error not all browsers support vibrate
|
||||||
if (navigator.vibrate && vibrate) {
|
if (navigator.vibrate && vibrate) {
|
||||||
window.addEventListener("haptic", handleHaptic);
|
window.addEventListener("haptic", handleHaptic);
|
||||||
} else {
|
} else {
|
||||||
@ -52,6 +53,7 @@ export const hapticMixin = <T extends Constructor<HassBaseEl>>(superClass: T) =>
|
|||||||
|
|
||||||
protected hassConnected() {
|
protected hassConnected() {
|
||||||
super.hassConnected();
|
super.hassConnected();
|
||||||
|
// @ts-expect-error not all browsers support vibrate
|
||||||
if (navigator.vibrate && this.hass!.vibrate) {
|
if (navigator.vibrate && this.hass!.vibrate) {
|
||||||
window.addEventListener("haptic", handleHaptic);
|
window.addEventListener("haptic", handleHaptic);
|
||||||
}
|
}
|
||||||
|
@ -13468,10 +13468,10 @@ typescript@^3.8.3:
|
|||||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061"
|
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061"
|
||||||
integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==
|
integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==
|
||||||
|
|
||||||
typescript@^4.0.3:
|
typescript@^4.2.4:
|
||||||
version "4.0.3"
|
version "4.2.4"
|
||||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.3.tgz#153bbd468ef07725c1df9c77e8b453f8d36abba5"
|
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.4.tgz#8610b59747de028fda898a8aef0e103f156d0961"
|
||||||
integrity sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg==
|
integrity sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==
|
||||||
|
|
||||||
typical@^4.0.0:
|
typical@^4.0.0:
|
||||||
version "4.0.0"
|
version "4.0.0"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user