mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
30 lines
640 B
TypeScript
30 lines
640 B
TypeScript
// Type definitions for debessmann 0.1
|
|
// Project: https://github.com/fs535/debessmann#readme
|
|
// Definitions by: Vladislavs Korehovs <https://github.com/vkorehov>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
export class EventId {
|
|
time: Date;
|
|
seq: number;
|
|
}
|
|
|
|
export class Event {
|
|
_id: EventId;
|
|
timestamp?: string;
|
|
id?: string;
|
|
payload?: any;
|
|
headers: { [key: string]: string; };
|
|
metrics?: { [key: string]: number; };
|
|
}
|
|
|
|
export class DM {
|
|
init(endpoint: string, authkey: string): void;
|
|
send(data: Event): void;
|
|
}
|
|
|
|
declare global {
|
|
interface Window {
|
|
dm: DM;
|
|
}
|
|
}
|