Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/SantaClaas/embedded-fan-control.
Something went wrong. Try again.
432 B · 15 lines
TypeScript
12345678910111213141516import { Fan } from "./devices/fan";import { TemperatureSensor } from "./devices/temperatureSensor";import type { Device } from "./modbus";
// export interface DeviceConstructor {// new (port: SerialPort, address: number): Device;// }
export const supportedDevices = { "Temperature Sensor": TemperatureSensor, Fan: Fan,};
type ValueOf<T> = T[keyof T];export type DeviceConstructor = ValueOf<typeof supportedDevices>;