missing gentype
This commit is contained in:
parent
a8c7297621
commit
55c03ed520
|
@ -7,6 +7,7 @@ external ivtString_: int = "IvtString"
|
|||
@module("ForTS_InternalValue_tag") @scope("InternalValueTag")
|
||||
external ivtRecordLike_: int = "IvtRecordLike"
|
||||
|
||||
@genType
|
||||
let getTag = (variant: internalValue) =>
|
||||
switch variant {
|
||||
| IvVoid(_) => ivtVoid_
|
||||
|
@ -14,18 +15,21 @@ let getTag = (variant: internalValue) =>
|
|||
| IvRecordLike(_) => ivtRecordLike_
|
||||
}
|
||||
|
||||
@genType
|
||||
let getVoid = (variant: internalValue): option<internalVoid> =>
|
||||
switch variant {
|
||||
| IvVoid(v) => Some(v)
|
||||
| _ => None
|
||||
}
|
||||
|
||||
@genType
|
||||
let getString = (variant: internalValue): option<string> =>
|
||||
switch variant {
|
||||
| IvString(s) => Some(s)
|
||||
| _ => None
|
||||
}
|
||||
|
||||
@genType
|
||||
let getRecordLike = (variant: internalValue): option<recordLike> =>
|
||||
switch variant {
|
||||
| IvRecordLike(r) => Some(r)
|
||||
|
|
Loading…
Reference in New Issue
Block a user