Skip to content

Commit

Permalink
refactor: remove unnecessary default param values (#543)
Browse files Browse the repository at this point in the history
Co-authored-by: Greg Magolan <gmagolan@gmail.com>
  • Loading branch information
jbedard and gregmagolan committed May 21, 2024
1 parent 71118ab commit 97eb82c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ts/private/ts_lib.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def _validate_tsconfig_dirs(root_dir, out_dir, typings_out_dir):
if typings_out_dir and typings_out_dir.find("../") != -1:
fail("typings_out_dir cannot output to parent directory")

def _calculate_js_outs(srcs, out_dir = ".", root_dir = ".", allow_js = False, resolve_json_module = False, preserve_jsx = False, emit_declaration_only = False):
def _calculate_js_outs(srcs, out_dir, root_dir, allow_js, resolve_json_module, preserve_jsx, emit_declaration_only):
if emit_declaration_only:
return []

Expand All @@ -249,7 +249,7 @@ def _calculate_js_outs(srcs, out_dir = ".", root_dir = ".", allow_js = False, re

return _to_js_out_paths(srcs, out_dir, root_dir, allow_js, resolve_json_module, exts)

def _calculate_map_outs(srcs, out_dir = ".", root_dir = ".", source_map = True, preserve_jsx = False, emit_declaration_only = False):
def _calculate_map_outs(srcs, out_dir, root_dir, source_map, preserve_jsx, emit_declaration_only):
if not source_map or emit_declaration_only:
return []

Expand Down
4 changes: 2 additions & 2 deletions ts/test/mock_transpiler.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def mock(name, srcs, source_map = False, **kwargs):
srcs = srcs,
# Calculate pre-declared outputs so they can be referenced as targets.
# This is an optional transpiler feature aligning with the default tsc transpiler.
js_outs = lib.calculate_js_outs(srcs),
map_outs = lib.calculate_map_outs(srcs) if source_map else [],
js_outs = lib.calculate_js_outs(srcs, ".", ".", False, False, False, False),
map_outs = lib.calculate_map_outs(srcs, ".", ".", True, False, False) if source_map else [],
**kwargs
)

0 comments on commit 97eb82c

Please sign in to comment.