Skip to content

Commit b414060

Browse files
fix: exported types
Exporting a const forces TS to decide what type the const is. This is important because that type is declared and the declaration does not appear in the output
1 parent 6795955 commit b414060

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

packages/helpers/python/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import formatExceptionCode from "./format_exception.py";
22

3-
export default formatExceptionCode;
3+
export const formatException = formatExceptionCode;

webpack.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ const formatExceptionBaseConfig = {
1010
},
1111
module: {
1212
rules: [
13+
{
14+
test: /\.ts$/,
15+
include: path.resolve(__dirname, "packages/helpers/"),
16+
loader: "ts-loader",
17+
options: {
18+
projectReferences: true,
19+
},
20+
},
1321
{
1422
test: /\.py/,
1523
type: "asset/source",

0 commit comments

Comments
 (0)