Skip to content

Commit bf0f26e

Browse files
authored
Fix TS declaration of TraceId to match definition (#520)
* Fix TS declaration of TraceId to match definition * fix lint error
1 parent 915da6a commit bf0f26e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/core/lib/segments/attributes/trace_id.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ declare class TraceID {
33
timestamp: string;
44
id: string;
55

6-
constructor();
6+
constructor(tsHex?: string, numberhex?: string);
77

88
static Invalid(): TraceID;
99

packages/core/test-d/index.test-d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,13 @@ expectType<void>(AWSXRay.setDaemonAddress('192.168.0.23:8080'));
4141

4242
const traceId = '1-57fbe041-2c7ad569f5d6ff149137be86';
4343
const traceId2 = new TraceID();
44+
const traceId3 = new TraceID('0', '0');
4445
const segment = new AWSXRay.Segment('test', traceId);
4546

4647
expectType<TraceID>(TraceID.FromString(traceId));
4748
expectType<TraceID>(TraceID.Invalid());
4849
expectType<string>(traceId2.toString());
50+
expectType<string>(traceId3.toString());
4951

5052
expectType<string>(AWSXRay.captureFunc('tracedFcn', () => 'OK', segment));
5153
expectType<void>(AWSXRay.captureFunc('tracedFcn', () => {

0 commit comments

Comments
 (0)