1
0
mirror of https://github.com/home-assistant/frontend.git synced 2025-12-20 02:38:53 +00:00
Files
frontend/src/data/bootstrap_integrations.ts
Bram Kragten e797c01761 Update lint rules (#9563)
Updated deps

Added `unused-imports`, prefer arrow, and import order
2021-07-15 12:08:04 +02:00

19 lines
475 B
TypeScript

import { HomeAssistant } from "../types";
export type BootstrapIntegrationsTimings = { [key: string]: number };
export const subscribeBootstrapIntegrations = (
hass: HomeAssistant,
callback: (message: BootstrapIntegrationsTimings) => void
) => {
const unsubProm =
hass.connection.subscribeMessage<BootstrapIntegrationsTimings>(
(message) => callback(message),
{
type: "subscribe_bootstrap_integrations",
}
);
return unsubProm;
};