@@ -29,6 +29,14 @@ def _gather_types_from_js_infos(targets):
2929 ])
3030 return depset ([], transitive = files_depsets )
3131
32+ def _gather_transitive_typecheck_from_output_group_infos (typecheck_outs , targets ):
33+ files_depsets = [
34+ target [OutputGroupInfo ].transitive_typecheck
35+ for target in targets
36+ if OutputGroupInfo in target and "transitive_typecheck" in target [OutputGroupInfo ]
37+ ]
38+ return depset (typecheck_outs , transitive = files_depsets )
39+
3240def _ts_project_impl (ctx ):
3341 """Creates the action which spawns `tsc`.
3442
@@ -315,6 +323,8 @@ See https://github.com/aspect-build/rules_ts/issues/361 for more details.
315323
316324 transitive_types = js_lib_helpers .gather_transitive_types (output_types , srcs_tsconfig_deps )
317325
326+ transitive_typecheck = _gather_transitive_typecheck_from_output_group_infos (typecheck_outs , ctx .attr .deps )
327+
318328 npm_sources = js_lib_helpers .gather_npm_sources (
319329 srcs = ctx .attr .srcs + [ctx .attr .tsconfig ],
320330 deps = ctx .attr .deps ,
@@ -362,6 +372,7 @@ See https://github.com/aspect-build/rules_ts/issues/361 for more details.
362372 OutputGroupInfo (
363373 types = output_types_depset ,
364374 typecheck = depset (typecheck_outs ),
375+ transitive_typecheck = transitive_typecheck ,
365376 # make the inputs to the tsc action available for analysis testing
366377 _action_inputs = transitive_inputs_depset ,
367378 # https://bazel.build/extending/rules#validations_output_group
0 commit comments