@@ -29,6 +29,15 @@ 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+ files_depsets .extend ([
35+ target [OutputGroupInfo ].transitive_typecheck
36+ for target in targets
37+ if OutputGroupInfo in target and "transitive_typecheck" in target [OutputGroupInfo ]
38+ ])
39+ return depset (typecheck_outs , transitive = files_depsets )
40+
3241def _ts_project_impl (ctx ):
3342 """Creates the action which spawns `tsc`.
3443
@@ -308,6 +317,8 @@ See https://github.com/aspect-build/rules_ts/issues/361 for more details.
308317
309318 transitive_types = js_lib_helpers .gather_transitive_types (output_types , srcs_tsconfig_deps )
310319
320+ transitive_typecheck = _gather_transitive_typecheck_from_output_group_infos (typecheck_outs , ctx .attr .deps )
321+
311322 npm_sources = js_lib_helpers .gather_npm_sources (
312323 srcs = ctx .attr .srcs + [ctx .attr .tsconfig ],
313324 deps = ctx .attr .deps ,
@@ -345,6 +356,7 @@ See https://github.com/aspect-build/rules_ts/issues/361 for more details.
345356 OutputGroupInfo (
346357 types = output_types_depset ,
347358 typecheck = depset (typecheck_outs ),
359+ transitive_typecheck = transitive_typecheck ,
348360 # make the inputs to the tsc action available for analysis testing
349361 _action_inputs = transitive_inputs_depset ,
350362 # https://bazel.build/extending/rules#validations_output_group
0 commit comments