Merge branch 'master' of https://github.com/dineshsaravanan/DefinitelyTyped into dineshsaravanan-master

This commit is contained in:
Andy Hanson
2018-03-06 08:01:36 -08:00
5 changed files with 68 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
import Tracer = require('datadog-tracer');
const tracer = new Tracer({
service: 'test'
});
tracer.on('error', (e: any) => {
void(0);
});

24
types/datadog-tracer/index.d.ts vendored Normal file
View File

@@ -0,0 +1,24 @@
// Type definitions for datadog-tracer 0.4
// Project: https://github.com/rochdev/datadog-tracer-js#readme
// Definitions by: Dinesh Saravanan Kumaraswamy <https://github.com/dineshsaravanan>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import * as opentracing from "opentracing";
import { EventEmitter } from "events";
export as namespace Tracer;
export = Tracer;
interface TracerOptions {
service: string;
hostname?: string;
port?: number;
protocol?: string;
endpoint?: string;
}
declare class Tracer extends opentracing.Tracer {
constructor(tracerOptions: TracerOptions);
on(method: "error", cb?: (e: any) => void): void;
addEventListener(method: "error", cb?: (e: any) => void): void;
}

View File

@@ -0,0 +1,6 @@
{
"private": true,
"dependencies": {
"opentracing": "^0.14.1"
}
}

View File

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

View File

@@ -0,0 +1,6 @@
{
"extends": "dtslint/dt.json",
"rules": {
"strict-export-declare-modifiers": false
}
}