remove @types/chromecast-caf-sender (#5537)
To prevent a collusion with `@types/chromecast-caf-receiver` that would make `lit-analyzer` fail.
This commit is contained in:
parent
4f9d77b906
commit
3d20d8b208
|
@ -52,6 +52,7 @@ class CastDemoRow extends LitElement implements LovelaceRow {
|
|||
});
|
||||
mgr.castContext.addEventListener(
|
||||
// eslint-disable-next-line no-undef
|
||||
// @ts-ignore
|
||||
cast.framework.CastContextEventType.SESSION_STATE_CHANGED,
|
||||
(ev) => {
|
||||
// On Android, opening a new session always results in SESSION_RESUMED.
|
||||
|
|
|
@ -128,7 +128,6 @@
|
|||
"@babel/preset-typescript": "^7.9.0",
|
||||
"@types/chai": "^4.1.7",
|
||||
"@types/chromecast-caf-receiver": "^3.0.12",
|
||||
"@types/chromecast-caf-sender": "^1.0.1",
|
||||
"@types/codemirror": "^0.0.78",
|
||||
"@types/hls.js": "^0.12.3",
|
||||
"@types/js-yaml": "^3.12.1",
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
/* eslint-disable no-undef, no-console */
|
||||
import {
|
||||
CastStateEventData,
|
||||
SessionStateEventData,
|
||||
} from "chromecast-caf-receiver/cast.framework";
|
||||
import { Auth } from "home-assistant-js-websocket";
|
||||
import { castApiAvailable } from "./cast_framework";
|
||||
import { CAST_APP_ID, CAST_DEV, CAST_NS } from "./const";
|
||||
|
@ -48,10 +44,12 @@ export class CastManager {
|
|||
autoJoinPolicy: chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED,
|
||||
});
|
||||
context.addEventListener(
|
||||
// @ts-ignore
|
||||
cast.framework.CastContextEventType.SESSION_STATE_CHANGED,
|
||||
(ev) => this._sessionStateChanged(ev)
|
||||
);
|
||||
context.addEventListener(
|
||||
// @ts-ignore
|
||||
cast.framework.CastContextEventType.CAST_STATE_CHANGED,
|
||||
(ev) => this._castStateChanged(ev)
|
||||
);
|
||||
|
@ -92,6 +90,7 @@ export class CastManager {
|
|||
}
|
||||
|
||||
public get castContext() {
|
||||
// @ts-ignore
|
||||
return cast.framework.CastContext.getInstance();
|
||||
}
|
||||
|
||||
|
@ -119,7 +118,7 @@ export class CastManager {
|
|||
}
|
||||
}
|
||||
|
||||
private _sessionStateChanged(ev: SessionStateEventData) {
|
||||
private _sessionStateChanged(ev) {
|
||||
if (__DEV__) {
|
||||
console.log("Cast session state changed", ev.sessionState);
|
||||
}
|
||||
|
@ -142,7 +141,7 @@ export class CastManager {
|
|||
}
|
||||
}
|
||||
|
||||
private _castStateChanged(ev: CastStateEventData) {
|
||||
private _castStateChanged(ev) {
|
||||
if (__DEV__) {
|
||||
console.log("Cast state changed", ev.castState);
|
||||
}
|
||||
|
|
|
@ -2536,11 +2536,6 @@
|
|||
resolved "https://registry.yarnpkg.com/@types/chromecast-caf-receiver/-/chromecast-caf-receiver-3.0.12.tgz#0172edc5e43a0b4f426b21a614a58e04e3df009d"
|
||||
integrity sha512-GdR9nGOENDWYhF40FasB0Xnsy3c+e68K90sGVBZx1W1N3LP1NGOmCtaxgUpxk4IuHYmzGrW7I57zWZIbT3D5BQ==
|
||||
|
||||
"@types/chromecast-caf-sender@^1.0.1":
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/chromecast-caf-sender/-/chromecast-caf-sender-1.0.1.tgz#da0047c41c2a7ecf2d5348715b27c4542ed9b579"
|
||||
integrity sha512-/JuG+zrS+KCPwEiOrK9O7WrIMyiUEF7Ev9ywbzXcCOPkXin9tLX7w9zxCmxtnOPdgH9lZbtOvgo5IA4cEJknRg==
|
||||
|
||||
"@types/clean-css@*":
|
||||
version "4.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/clean-css/-/clean-css-4.2.1.tgz#cb0134241ec5e6ede1b5344bc829668fd9871a8d"
|
||||
|
|
Loading…
Reference in New Issue