Skip to content
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

Merged
merged 3 commits into from
May 1, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
!README.md
!binding.gyp
!index.js
!index.d.ts
!*.d.ts
rochdev marked this conversation as resolved.
Show resolved Hide resolved
!package.json
10 changes: 10 additions & 0 deletions ext/formats.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import * as opentracing from 'opentracing'

declare const formats: {
TEXT_MAP: typeof opentracing.FORMAT_TEXT_MAP
HTTP_HEADERS: typeof opentracing.FORMAT_HTTP_HEADERS
BINARY: typeof opentracing.FORMAT_BINARY
LOG: boolean
rochdev marked this conversation as resolved.
Show resolved Hide resolved
}

export = formats
5 changes: 5 additions & 0 deletions ext/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import * as priority from './priority'
rochdev marked this conversation as resolved.
Show resolved Hide resolved
import * as tags from './tags'
import * as formats from './formats'

export { priority, tags, formats }
rochdev marked this conversation as resolved.
Show resolved Hide resolved
8 changes: 8 additions & 0 deletions ext/kinds.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
declare const kinds: {
SERVER: string
CLIENT: string
PRODUCER: string
CONSUMER: string
}

export = kinds
8 changes: 8 additions & 0 deletions ext/priority.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
declare const priority: {
USER_REJECT: number
AUTO_REJECT: number
AUTO_KEEP: number
USER_KEEP: number
}
rochdev marked this conversation as resolved.
Show resolved Hide resolved

export = priority
19 changes: 19 additions & 0 deletions ext/tags.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
declare const tags: {
SERVICE_NAME: string
RESOURCE_NAME: string
SPAN_TYPE: string
SPAN_KIND: string
SAMPLING_PRIORITY: string
rochdev marked this conversation as resolved.
Show resolved Hide resolved
ANALYTICS: string
ERROR: string
MANUAL_KEEP: string
MANUAL_DROP: string
HTTP_URL: string
HTTP_METHOD: string
HTTP_STATUS_CODE: string
HTTP_ROUTE: string
HTTP_REQUEST_HEADERS: string
HTTP_RESPONSE_HEADERS: string
}

export = tags
6 changes: 6 additions & 0 deletions ext/types.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
declare const types: {
HTTP: string
WEB: string
}

export = types