Closed marmaladebacon closed 5 years ago
any update on this?
Seems fine, but is there more that should be added? Seems like it's just the tracer options.
Hi @austinlparker , actually I am wondering if I should just have the tracer options and the constructor for tracer typed since only the Tracer is exported https://github.com/lightstep/lightstep-tracer-javascript/blob/master/src/lib.js#L4, and for everything else shouldn't we be using the typings from https://github.com/opentracing/opentracing-javascript for compatibility with the opentracing api?
For Tracer, Span, SpanContext they already have that typed out.
Apologies if i'm missing something obvious here.
Yeah, that makes sense. I'm not super familiar with adding typings to a JS project, do they automatically get inherited?
edit - by 'they' i mean the typings from opentracing-javascript
I believe they do, from https://www.typescriptlang.org/docs/handbook/declaration-merging.html
“declaration merging” means that the compiler merges two separate declarations declared with the same name into a single definition. This merged definition has the features of both of the original declarations.
The additions from this PR
The startSpan typing from opentracing:
I've also added a ^to the version for opentracing so that it can be kept in sync with projects using ^0.14.x opentracing.
Many thanks for approving this @austinlparker! is there a known release date for the next version of lightstep-tracer-javascript?
Probably later this week or early next week.
This change was released in v0.22.1, out today.
From https://github.com/lightstep/lightstep-tracer-javascript/issues/99#issuecomment-516809657 Adding the TS definitions provided by felixfbecker with minor additions.
New to definition files so comments and suggestions would be welcome.