@@ -69,19 +69,22 @@ type type_decl_resolution_strategy = [
6969 | `import_location of string
7070 | `inline_type_definition
7171 | `infile_type_definition
72+ | `no_resolution
7273]
7374
7475type ident_resolution_strategy = [
7576 | `import_location of string
7677 | `inline_type_definition of ts_type_desc
7778 | `infile_type_definition of ts_type_desc
79+ | `no_resolution
7880]
7981
8082let validate_resolution_strategy ~(type_decl_resolution_strategy : _ -> _ -> type_decl_resolution_strategy ) td codec =
8183 let strategy = type_decl_resolution_strategy td codec in
8284 let () = match strategy with
8385 | `import_location _
84- | `infile_type_definition -> ()
86+ | `infile_type_definition
87+ | `no_resolution -> ()
8588 | `inline_type_definition when is_recursive td -> failwith " Recursive type cannot be defined inilne."
8689 | `inline_type_definition -> ()
8790 in
@@ -187,7 +190,8 @@ let ts_type_desc_of_type_decl :
187190 fun ~type_decl_resolution_strategy td codec ->
188191 match type_decl_resolution_strategy td codec with
189192 | `import_location _
190- | `infile_type_definition ->
193+ | `infile_type_definition
194+ | `no_resolution ->
191195 `type_reference (Ts_config. get_mangled_name_of_type ~escaping_charmap: Mangling. charmap_js_identifier td |> fst)
192196 | `inline_type_definition ->
193197 td
@@ -202,7 +206,8 @@ let ts_type_desc_of_ident :
202206 fun ~ident_resolution_strategy mangling_style ident ->
203207 match ident_resolution_strategy ident with
204208 | `import_location _
205- | `infile_type_definition _ ->
209+ | `infile_type_definition _
210+ | `no_resolution ->
206211 `type_reference (Ts_config. mangled `type_name mangling_style ident.id_name |> Mangling. (escape ~charmap: charmap_js_identifier))
207212 | `inline_type_definition desc -> desc
208213
0 commit comments