mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-06 04:34:24 +08:00
* add types of zipkin-context-cls, zipkin-instrumentation-express, zipkin-instrumentation-fetch, zipkin-transport-http * fix: CI failure because express require typescript 2.2 * fix: test zipkin-context-cls only, remove irrelevant test code
17 lines
540 B
TypeScript
17 lines
540 B
TypeScript
// Type definitions for zipkin-context-cls 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
|
|
|
|
import { Context, TraceId } from 'zipkin';
|
|
|
|
declare class CLSContext implements Context<any> {
|
|
setContext(ctx: TraceId): void;
|
|
getContext(): TraceId;
|
|
scoped<V>(callback: () => V): V;
|
|
letContext<V>(ctx: TraceId, callback: () => V): V;
|
|
constructor(name: string)
|
|
}
|
|
|
|
export = CLSContext;
|