mirror of
https://github.com/FormidableLabs/webpack-dashboard.git
synced 2026-01-18 14:18:05 +00:00
- 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...
22 lines
439 B
TypeScript
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;
|
|
}
|