Adding TypeScript typings form Debessmann monitoring system.

This commit is contained in:
vladlv
2017-04-11 16:53:47 +03:00
parent 14f8fb1b17
commit 8e58339908
4 changed files with 52 additions and 0 deletions

View File

29
types/debessmann/index.d.ts vendored Normal file
View File

@@ -0,0 +1,29 @@
// 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;
id: string;
timestamp: 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;
}
}

View File

@@ -0,0 +1,22 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"debessmann-tests.ts"
]
}

View File

@@ -0,0 +1 @@
{ "extends": "../tslint.json" }