UNPKG

typescript-assistant

Version:

Combines and integrates professional Typescript tools into your project

17 lines (16 loc) 707 B
export type EventType = "compile-started" | "compile-compiled" | "compile-errored" | "lint-linted" | "lint-errored" | "format-verified" | "format-errored" | "source-files-changed" | "report"; export type Callback = (info?: Report) => void; export interface Report { tool: "format" | "lint" | "test" | "coverage" | "compiler"; status: "ready" | "busy"; errors?: number; fixable?: number; } export interface Bus { signal(eventType: EventType): void; report(report: Report): void; register(type: EventType, callback: Callback): void; registerAll(types: EventType[], callback: Callback): void; unregister(callback: Callback): void; } export declare let createBus: () => Bus;