Skip to content

Commit 689c2ca

Browse files
correctly mark namespace as an optional argument
1 parent cb33926 commit 689c2ca

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

types/zipkin-context-cls/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ declare class CLSContext implements Context<any> {
55
getContext(): TraceId;
66
scoped<V>(callback: () => V): V;
77
letContext<V>(ctx: TraceId, callback: () => V): V;
8-
constructor(name: string, supportAsyncAwait?: boolean);
8+
constructor(name?: string, supportAsyncAwait?: boolean);
99
}
1010

1111
export = CLSContext;
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { BatchRecorder, jsonEncoder, Tracer } from "zipkin";
2-
31
import CLSContext = require("zipkin-context-cls");
42

5-
const ctxImpl = new CLSContext("zipkin");
6-
const ctxImplAsyncAwait = new CLSContext("zipkin", true);
3+
const ctxImpl = new CLSContext();
4+
const ctxImplName = new CLSContext("zipkin");
5+
const ctxImplNameAsyncAwait = new CLSContext("zipkin", true);

0 commit comments

Comments
 (0)