Skip to content

Commit 5c3562c

Browse files
committed
Include TS declarations in ts_library JsInfo
I don't understand this well. Claude Code stumbled upon it as a fix for the regression we had after jumping from rules_js of August 2022 to March 2025 in our main repo. The issue is we have a ts_library containing .js, .js.map, and .d.ts files generated from X12 fixtures. Updating our pin on rules_js caused those .d.ts files to stop getting included in our node_modules_package target for VSCode type hints. (Other ts_library and js_import_ts targets were fine).
1 parent 1a41ea8 commit 5c3562c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ts-proto/rules.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def _ts_proto_libraries_impl(ctx):
247247

248248
js_infos[lib.label] = create_js_info(
249249
cjs_root = cjs_root,
250-
files = js,
250+
files = js + declarations,
251251
deps = ts_proto.deps_js + [js_infos[label] for label in lib.deps],
252252
)
253253

typescript/rules.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ def _ts_library_impl(ctx):
360360
js_info = create_js_info(
361361
cjs_root = cjs_root,
362362
deps = js_deps + compiler.runtime_js,
363-
files = js,
363+
files = js + declarations,
364364
)
365365

366366
ts_info = create_ts_info(

0 commit comments

Comments
 (0)