-
- ${this.renderToolbar(state)}
+ ${this.renderToolbar(this.entity.state)}
`;
}
}
-customElements.define('vacuum-card', VacuumCard);
+declare global {
+ interface Window {
+ customCards?: unknown[];
+ }
+}
window.customCards = window.customCards || [];
window.customCards.push({
diff --git a/tsconfig.json b/tsconfig.json
new file mode 100644
index 00000000..d2b17065
--- /dev/null
+++ b/tsconfig.json
@@ -0,0 +1,21 @@
+{
+ "compilerOptions": {
+ "target": "es2017",
+ "module": "esnext",
+ "moduleResolution": "node",
+ "lib": ["es2017", "dom", "dom.iterable"],
+ "noEmit": true,
+ "noUnusedParameters": true,
+ "noImplicitReturns": true,
+ "noFallthroughCasesInSwitch": true,
+ "strict": true,
+ "noImplicitAny": false,
+ "skipLibCheck": true,
+ "resolveJsonModule": true,
+ "experimentalDecorators": true,
+ "allowSyntheticDefaultImports": true,
+ "esModuleInterop": true,
+ "allowJs": true,
+ "typeRoots": ["./node_modules/@types", "./src/declarations.d.ts"]
+ }
+}