File tree Expand file tree Collapse file tree 3 files changed +6
-8
lines changed Expand file tree Collapse file tree 3 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -195,16 +195,15 @@ let rec renderType ~(config : Config.t) ?(indent = None) ~typeNameIsInterface
195
195
t |> renderType ~config ~indent ~type NameIsInterface ~in FunType
196
196
in
197
197
let tagField =
198
- case |> labelJSToString
199
- |> field ~name: (Runtime. jsVariantTag ~polymorphic: false )
198
+ case |> labelJSToString |> field ~name: Runtime. jsVariantTag
200
199
in
201
200
match (unboxed, type_) with
202
201
| true , type_ -> type_ |> render
203
202
| false , type_ when polymorphic ->
204
203
(* poly variant *)
205
204
[
206
205
case |> labelJSToString
207
- |> field ~name: ( Runtime. jsVariantTag ~polymorphic ) ;
206
+ |> field ~name: Runtime. jsPolymorphicVariantTag ;
208
207
type_ |> render
209
208
|> field ~name: (Runtime. jsVariantValue ~polymorphic );
210
209
]
Original file line number Diff line number Diff line change @@ -24,10 +24,8 @@ let rec emitModuleAccessPath ~config moduleAccessPath =
24
24
| Dot (p , moduleItem ) ->
25
25
p |> emitModuleAccessPath ~config |> EmitText. fieldAccess ~label: moduleItem
26
26
27
- let jsVariantTag ~polymorphic =
28
- match polymorphic with
29
- | true -> " NAME"
30
- | false -> " TAG"
27
+ let jsVariantTag = " TAG"
28
+ let jsPolymorphicVariantTag = " NAME"
31
29
32
30
let jsVariantPayloadTag ~n = " _" ^ string_of_int n
33
31
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ val newModuleItem : name:string -> moduleItem
15
15
val newRecordValue : unboxed :bool -> recordGen -> recordValue
16
16
val recordGen : unit -> recordGen
17
17
val recordValueToString : recordValue -> string
18
- val jsVariantTag : polymorphic :bool -> string
18
+ val jsVariantTag : string
19
+ val jsPolymorphicVariantTag : string
19
20
val jsVariantPayloadTag : n :int -> string
20
21
val jsVariantValue : polymorphic :bool -> string
You can’t perform that action at this time.
0 commit comments