func (this CredentialMediationRequirement) Value() string {
	idx := int(this)
	if idx >= 0 && idx < len(credentialMediationRequirementToWasmTable) {
		return credentialMediationRequirementToWasmTable[idx]
	}
	panic("unknown input value")
}
Value is converting this into javascript defined
string value
package credential
import js "github.com/gowebapi/webapi/core/js"
import (
	"github.com/gowebapi/webapi/crypto/authentication"
	"github.com/gowebapi/webapi/dom/domcore"
	"github.com/gowebapi/webapi/javascript"
)
func unused(value interface{}) {
}
type Union struct {
	Value js.Value
}
func (u *Union) JSValue() js.Value {
	return u.Value
}
func UnionFromJS(value js.Value) *Union {
	return &Union{Value: value}
}
type CredentialMediationRequirement int
const (
	SilentCredentialMediationRequirement CredentialMediationRequirement = iota
	OptionalCredentialMediationRequirement
	RequiredCredentialMediationRequirement
)
var credentialMediationRequirementToWasmTable = []string{
	"silent", "optional", "required",
}
var credentialMediationRequirementFromWasmTable = map[string]CredentialMediationRequirement{
	"silent": SilentCredentialMediationRequirement, "optional": OptionalCredentialMediationRequirement, "required": RequiredCredentialMediationRequirement,
}
func (this *CredentialMediationRequirement) JSValue() js.Value {
	return js.ValueOf(this.Value())
}