balena-supervisor/src/device-state.d.ts
Cameron Diver 20a83e8e0a Add more typescript conversions and export utilities from existing
Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
2019-07-09 13:21:05 +01:00

32 lines
840 B
TypeScript

import { EventEmitter } from 'events';
import { Router } from 'express';
import ApplicationManager from './application-manager';
import Config from './config';
import Database from './db';
import DeviceConfig from './device-config';
import EventTracker from './event-tracker';
import Logger from './logger';
// This is a very incomplete definition of the device state
// class, which should be rewritten in typescript soon
class DeviceState extends EventEmitter {
public applications: ApplicationManager;
public router: Router;
public deviceConfig: DeviceConfig;
public constructor(args: {
config: Config;
db: Database;
eventTracker: EventTracker;
logger: Logger;
});
public healthcheck(): Promise<void>;
public normaliseLegacy(client: PinejsClientRequest): Promise<void>;
public async init();
}
export = DeviceState;