Ryan Roemer 48025857ba
Bug: TS fixes (#341)
- Move types to `pluing/types.d.ts`
- Update plugin signature to webpack 5 inclusive format
- Add webpack type check to `check-ts`
- Add `yarn dev-ts` TS-based configuration example to our examples...
2022-01-21 10:54:32 -08:00

22 lines
439 B
TypeScript

interface IMessage {
type: string;
value: string | number | { [key: string]: any }
error?: boolean;
}
interface IDashboardOptions {
port?: number;
host?: string;
handler?: (dataArray: IMessage[]) => void;
}
interface ICompiler {
hooks?: any;
plugin?: (name: string, callback: () => void) => void;
}
export default class DashboardPlugin {
constructor(options?: IDashboardOptions);
apply(compiler: ICompiler): void;
}