mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-03 06:51:26 +08:00
Fixes #1546
This commit is contained in:
parent
c82683babf
commit
1cbc34eff8
@ -73,8 +73,10 @@ func (b *Bindings) GenerateGoBindings(baseDir string) error {
|
|||||||
firstType := goTypeToTypescriptType(methodDetails.Outputs[0].TypeName, &importNamespaces)
|
firstType := goTypeToTypescriptType(methodDetails.Outputs[0].TypeName, &importNamespaces)
|
||||||
returnType += "<" + firstType
|
returnType += "<" + firstType
|
||||||
if methodDetails.OutputCount() == 2 {
|
if methodDetails.OutputCount() == 2 {
|
||||||
secondType := goTypeToTypescriptType(methodDetails.Outputs[1].TypeName, &importNamespaces)
|
if methodDetails.Outputs[1].TypeName != "error" {
|
||||||
returnType += "|" + secondType
|
secondType := goTypeToTypescriptType(methodDetails.Outputs[1].TypeName, &importNamespaces)
|
||||||
|
returnType += "|" + secondType
|
||||||
|
}
|
||||||
}
|
}
|
||||||
returnType += ">"
|
returnType += ">"
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user