File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -226,6 +226,16 @@ See https://github.com/aspect-build/rules_ts/issues/361 for more details.
226
226
output_sources .append (s )
227
227
elif _lib .is_typings_src (s .path ):
228
228
output_types .append (s )
229
+ else :
230
+ # Add DTS inputs that are not transpiled by tsc yet should be copied to the out_dir
231
+ for s in srcs_inputs :
232
+ if _lib .is_typings_src (s .path ):
233
+ dts_path = _lib .relative_to_package (s .path , ctx )
234
+ dts_out_path = _lib .to_out_path (dts_path , ctx .attr .out_dir , ctx .attr .root_dir )
235
+ if s .is_source or dts_path != dts_out_path :
236
+ dts_out = ctx .actions .declare_file (dts_out_path )
237
+ copy_file_action (ctx , s , dts_out )
238
+ output_types .append (dts_out )
229
239
230
240
# Make sure the user has acknowledged that transpiling is slow
231
241
if len (outputs ) > 0 and ctx .attr .transpile == - 1 and not ctx .attr .emit_declaration_only and not options .default_to_tsc_transpiler :
You can’t perform that action at this time.
0 commit comments