mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-02-22 00:32:51 +00:00
Add zipkin javascript opentracing types (#27330)
* Added type definitions for zipkin-javascript-opentracing * Added type definitions for zipkin-javascript-opentracing * update import
This commit is contained in:
parent
250972049c
commit
fecb03bc20
50
types/zipkin-javascript-opentracing/index.d.ts
vendored
Normal file
50
types/zipkin-javascript-opentracing/index.d.ts
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
// Type definitions for zipkin-javascript-opentracing 1.6
|
||||
// Project: https://github.com/DanielMSchmidt/zipkin-javascript-opentracing
|
||||
// Definitions by: Laurent Gilly <https://github.com/laurentgilly>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = zipkin_javascript_opentracing;
|
||||
|
||||
declare class zipkin_javascript_opentracing {
|
||||
constructor(...args: any[]);
|
||||
|
||||
extract(format: any, carrier: any): any;
|
||||
|
||||
inject(span: any, format: any, carrier: any): void;
|
||||
|
||||
startSpan(name: any, ...args: any[]): any;
|
||||
|
||||
static FORMAT_BINARY: string;
|
||||
|
||||
static FORMAT_HTTP_HEADERS: string;
|
||||
|
||||
static FORMAT_TEXT_MAP: string;
|
||||
|
||||
static makeOptional(val: any): any;
|
||||
}
|
||||
|
||||
declare namespace zipkin_javascript_opentracing {
|
||||
namespace makeOptionalNamespace {
|
||||
const prototype: {};
|
||||
}
|
||||
|
||||
namespace prototypeNamespace {
|
||||
function extract(format: any, carrier: any): any;
|
||||
|
||||
function inject(span: any, format: any, carrier: any): void;
|
||||
|
||||
function startSpan(name: any, ...args: any[]): any;
|
||||
|
||||
namespace extract {
|
||||
const prototype: {};
|
||||
}
|
||||
|
||||
namespace inject {
|
||||
const prototype: {};
|
||||
}
|
||||
|
||||
namespace startSpan {
|
||||
const prototype: {};
|
||||
}
|
||||
}
|
||||
}
|
||||
16
types/zipkin-javascript-opentracing/tsconfig.json
Normal file
16
types/zipkin-javascript-opentracing/tsconfig.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": ["es6"],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": ["../"],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": ["index.d.ts", "zipkin-javascript-opentracing-tests.ts"]
|
||||
}
|
||||
1
types/zipkin-javascript-opentracing/tslint.json
Normal file
1
types/zipkin-javascript-opentracing/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
@ -0,0 +1,9 @@
|
||||
import ZipkinOpentracing = require("zipkin-javascript-opentracing");
|
||||
const zipkinBaseUrl = "http://zipkin.danielmschmidt.de";
|
||||
|
||||
// Setup the tracer
|
||||
const tracer = new ZipkinOpentracing({
|
||||
serviceName: "zipkin-opentracing-service",
|
||||
endpoint: zipkinBaseUrl,
|
||||
kind: "client"
|
||||
});
|
||||
Loading…
Reference in New Issue
Block a user