Skip to content

Commit cde3e6a

Browse files
committed
fix formatting
1 parent ad6f154 commit cde3e6a

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

compiler/gentype/GenTypeMain.ml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,13 @@ let read_input_cmt is_interface cmt_file =
9696
let check_annotation ~loc:_ attributes =
9797
if
9898
attributes
99-
|> Annotation.get_attribute_payload Annotation.tag_is_gentype_ignore_interface
99+
|> Annotation.get_attribute_payload
100+
Annotation.tag_is_gentype_ignore_interface
100101
<> None
101102
then ignore_interface := true;
102103
attributes
103-
|> Annotation.get_attribute_payload Annotation.tag_is_one_of_the_gentype_annotations
104+
|> Annotation.get_attribute_payload
105+
Annotation.tag_is_one_of_the_gentype_annotations
104106
<> None
105107
in
106108
let has_gentype_annotations =
@@ -138,7 +140,9 @@ let process_cmt_file cmt =
138140
if cmt_file <> "" then
139141
let file_name = cmt |> Paths.get_module_name in
140142
let is_interface = Filename.check_suffix cmt_file ".cmti" in
141-
let input_cmt, has_gentype_annotations = read_input_cmt is_interface cmt_file in
143+
let input_cmt, has_gentype_annotations =
144+
read_input_cmt is_interface cmt_file
145+
in
142146
let source_file =
143147
match input_cmt.cmt_annots |> FindSourceFile.cmt with
144148
| Some source_file -> source_file
@@ -150,7 +154,9 @@ let process_cmt_file cmt =
150154
| false -> ".res")
151155
in
152156
let output_file = source_file |> Paths.get_output_file ~config in
153-
let output_file_relative = source_file |> Paths.get_output_file_relative ~config in
157+
let output_file_relative =
158+
source_file |> Paths.get_output_file_relative ~config
159+
in
154160
let resolver =
155161
ModuleResolver.create_lazy_resolver ~config
156162
~extensions:[".res"; ".shim.ts"] ~exclude_file:(fun fname ->

compiler/gentype/Paths.ml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,21 @@ let find_name_space cmt =
2929
cmt |> Filename.basename |> (Filename.chop_extension [@doesNotRaise])
3030
|> keep_after_dash
3131

32-
let remove_project_root_from_absolute_path ~(config: Config.t) source_path =
32+
let remove_project_root_from_absolute_path ~(config : Config.t) source_path =
3333
let i = String.length config.project_root + 1 in
3434
let n = String.length source_path - i in
3535
(String.sub source_path i n [@doesNotRaise])
3636

3737
let get_output_file_relative ~config source_path =
3838
if Filename.is_relative source_path then
39-
(source_path |> handle_namespace) ^ ModuleExtension.ts_input_file_suffix ~config
39+
(source_path |> handle_namespace)
40+
^ ModuleExtension.ts_input_file_suffix ~config
4041
else
4142
let relative_path =
4243
remove_project_root_from_absolute_path ~config source_path
4344
in
44-
(relative_path |> handle_namespace) ^ ModuleExtension.ts_input_file_suffix ~config
45+
(relative_path |> handle_namespace)
46+
^ ModuleExtension.ts_input_file_suffix ~config
4547

4648
let get_output_file ~(config : Config.t) sourcePath =
4749
if Filename.is_relative sourcePath then

0 commit comments

Comments
 (0)