mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-14 05:50:20 +00:00
zipkin-instrumentation-express: Provides its own types (#39445)
This commit is contained in:
committed by
Jesse Trinity
parent
c3770b5a23
commit
0767699127
@@ -4674,6 +4674,12 @@
|
||||
"sourceRepoURL": "https://github.com/zetapush/zetapush-js",
|
||||
"asOfVersion": "3.1.2"
|
||||
},
|
||||
{
|
||||
"libraryName": "zipkin-instrumentation-express",
|
||||
"typingsPackageName": "zipkin-instrumentation-express",
|
||||
"sourceRepoURL": "https://github.com/openzipkin/zipkin-js#readme",
|
||||
"asOfVersion": "0.12.0"
|
||||
},
|
||||
{
|
||||
"libraryName": "Zone.js",
|
||||
"typingsPackageName": "zone.js",
|
||||
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
// Type definitions for zipkin-instrumentation-express 0.11
|
||||
// Project: https://github.com/openzipkin/zipkin-js#readme
|
||||
// Definitions by: York Yao <https://github.com/plantain-00>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
import express = require('express');
|
||||
import { Tracer } from 'zipkin';
|
||||
|
||||
export interface Options {
|
||||
tracer: Tracer;
|
||||
}
|
||||
|
||||
export function expressMiddleware(options: Options): express.RequestHandler;
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"zipkin": ">=0.11.0"
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"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-instrumentation-express-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
@@ -1,12 +0,0 @@
|
||||
import express = require('express');
|
||||
import { Tracer, ExplicitContext, ConsoleRecorder } from 'zipkin';
|
||||
import { expressMiddleware as zipkinMiddleware } from 'zipkin-instrumentation-express';
|
||||
|
||||
const ctxImpl = new ExplicitContext();
|
||||
const recorder = new ConsoleRecorder();
|
||||
const localServiceName = 'service-a';
|
||||
const tracer = new Tracer({ ctxImpl, recorder, localServiceName });
|
||||
|
||||
const app = express();
|
||||
|
||||
app.use(zipkinMiddleware({ tracer }));
|
||||
Reference in New Issue
Block a user