Bump typescript to 4.2.4 (#8876)

This commit is contained in:
Bram Kragten 2021-04-14 21:00:24 +02:00 committed by GitHub
parent b8bb0c038d
commit a43120320e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 12 additions and 10 deletions

View File

@ -227,7 +227,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",

View File

@ -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();

View File

@ -1,4 +1,4 @@
export const afterNextRender = (cb: () => void): void => {
export const afterNextRender = (cb: (value: unknown) => void): void => {
requestAnimationFrame(() => setTimeout(cb, 0));
};

View File

@ -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;
});

View File

@ -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, {

View File

@ -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, {

View File

@ -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 {
@ -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);
}

View File

@ -13468,10 +13468,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"