Skip to content

Commit 22a4ba5

Browse files
committed
Refactor.
1 parent 148829d commit 22a4ba5

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

jscomp/gentype/Converter.ml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,6 @@ let rec toString converter =
5858
let typeGetConverterNormalized ~config ~inline ~lookupId ~typeNameIsInterface
5959
type0 =
6060
let circular = ref "" in
61-
let expandOneLevel type_ =
62-
match type_ with
63-
| Ident {builtin = false; name} -> (
64-
match name |> lookupId with
65-
| (t : CodeItem.exportTypeItem) -> t.type_
66-
| exception Not_found -> type_)
67-
| _ -> type_
68-
in
6961
let rec visit ~(visited : StringSet.t) type_ =
7062
let normalized_ = type_ in
7163
match type_ with
@@ -111,9 +103,8 @@ let typeGetConverterNormalized ~config ~inline ~lookupId ~typeNameIsInterface
111103
circular := name;
112104
(IdentC, normalized_))
113105
else
114-
let visited = visited |> StringSet.add name in
115106
match name |> lookupId with
116-
| {annotation = GenTypeOpaque} -> (IdentC, normalized_)
107+
| {CodeItem.annotation = GenTypeOpaque} -> (IdentC, normalized_)
117108
| {annotation = NoGenType} -> (IdentC, normalized_)
118109
| {typeVars; type_} -> (
119110
let pairs =
@@ -170,7 +161,6 @@ let typeGetConverterNormalized ~config ~inline ~lookupId ~typeNameIsInterface
170161
match withPayloadConverted with
171162
| [] when ordinaryVariant -> normalized_
172163
| [payload] when ordinaryVariant ->
173-
let _unboxed = payload.t |> expandOneLevel |> typeIsObject in
174164
let normalized = Variant {variant with payloads = [payload]} in
175165
normalized
176166
| withPayloadConverted ->

0 commit comments

Comments
 (0)