Skip to content
This repository was archived by the owner on Oct 30, 2025. It is now read-only.

Commit e796431

Browse files
committed
Bundle libhoney types
1 parent 68e9e99 commit e796431

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
"version": "0.4.1",
44
"description": "A partial implementation of the Opentracing JavaScript API for honeycomb.io backend",
55
"main": "dist/src/index.js",
6-
"types": "dist/src/index.d.js",
76
"files": [
87
"dist/src/**"
98
],
109
"scripts": {
11-
"build": "tsc",
10+
"build": "tsc && yarn copy-types",
1211
"watch": "tsc --watch",
12+
"copy-types": "copyfiles -u 1 './types/**/*.d.ts' dist/types",
1313
"fmt": "prettier --single-quote --bracket-spacing --trailing-comma all --write './{src,test,types,examples}/**/*.ts'",
1414
"test": "tape dist/test/**.js",
1515
"test-coverage": "npx c8 --reporter=lcov npm test && npx codecov"
@@ -24,6 +24,7 @@
2424
"@types/node": "^11.9.4",
2525
"@types/node-fetch": "^2.1.6",
2626
"@types/tape": "^4.2.33",
27+
"copyfiles": "^2.1.0",
2728
"node-fetch": "^2.3.0",
2829
"prettier": "^1.16.4",
2930
"tape": "^4.10.1",

src/shared.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/// <reference types="../types/libhoney" />
2+
13
import Libhoney from 'libhoney';
24
import { Span } from './span';
35
import { SpanContext } from './span-context';

tsconfig.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,7 @@
1313
"outDir": "./dist",
1414
"types": ["node"],
1515
"strict": true,
16-
"target": "esnext",
17-
"typeRoots": [
18-
"./types",
19-
"./node_modules/@types"
20-
]
16+
"target": "esnext"
2117
},
2218
"include": ["./src", "./test", "./types", "./examples"]
2319
}

0 commit comments

Comments
 (0)