-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add typings for ext submodules #545
Conversation
I would say to narrow the values similar to OpenTracing. Then it will be possible as a future improvement to also add auto completion for any built-in tag by defining accepted values. |
Added the changes as a separate commit for clarity, you can squash it if you agree with the changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@Oblosys Do you think these should be tested in test.ts
? Maybe at least one entry per file just to validate they are picked up by the transpiler? Is it guaranteed that TypeScript will always pick up every .d.ts
for a corresponding .js
?
Ah, there are tests, but they are in the |
I needed some of these typings, so I created the others as well. The Datadog constants are typed as
string
, to avoid duplicating the values in the type definitions, but the constants fromopentracing
are imported, so their types are narrowed to the actual values. In case you want this to be consistent, those constants could be typed as string as well (or the Datadog constants could be narrowed to their actual values).