5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-10 03:10:30 +08:00

Support TS bindings. Update tests. Tidy up.

This commit is contained in:
Lea Anthony 2023-12-23 08:49:58 +11:00
parent cf7537df01
commit d1255d3a9d
No known key found for this signature in database
GPG Key ID: 33DAF7BB90A58405
75 changed files with 1824 additions and 316 deletions

View File

@ -3,7 +3,6 @@ package parser
import (
"fmt"
"sort"
"strconv"
"strings"
"github.com/samber/lo"
@ -15,29 +14,41 @@ const header = `// @ts-check
`
const headerTypescript = `// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
`
const bindingTemplate = `
/**Comments
* @function {{methodName}}* @param names {string}
* @returns {Promise<string>}
**/
`
const bindingTemplateTypescript = `Comments`
const callByID = `export function {{methodName}}({{inputs}}) {
const callByIDTypescript = `export async function {{methodName}}({{inputs}}) : {{ReturnType}} {
return wails.CallByID({{ID}}{{params}});
}
`
const callByNameTypescript = `export async function {{methodName}}({{inputs}}) : {{ReturnType}} {
return wails.CallByName("{{Name}}"{{params}});
}
`
const callByID = `export async function {{methodName}}({{inputs}}) {
return wails.CallByID({{ID}}, ...Array.prototype.slice.call(arguments, 0));
}
`
const callByName = `export function {{methodName}}({{inputs}}) {
const callByName = `export async function {{methodName}}({{inputs}}) {
return wails.CallByName("{{Name}}", ...Array.prototype.slice.call(arguments, 0));
}
`
const enumTemplate = `
export enum {{.EnumName}} {
{{.EnumValues}}
}
`
var reservedWords = []string{
"abstract",
"arguments",
@ -219,6 +230,102 @@ func GenerateBinding(thisStructName string, method *BoundMethod, useIDs bool) (s
return result, lo.Uniq(models), externalStructs
}
func GenerateBindingTypescript(thisStructName string, method *BoundMethod, useIDs bool) (string, []string, map[packagePath]map[string]*ExternalStruct) {
var externalStructs = make(map[packagePath]map[string]*ExternalStruct)
var models []string
template := bindingTemplateTypescript
if useIDs {
template += callByIDTypescript
} else {
template += callByNameTypescript
}
result := strings.ReplaceAll(template, "{{structName}}", thisStructName)
result = strings.ReplaceAll(result, "{{methodName}}", method.Name)
result = strings.ReplaceAll(result, "{{ID}}", fmt.Sprintf("%v", method.ID))
// get last part of method.Package path
parts := strings.Split(method.Package, "/")
packageName := parts[len(parts)-1]
result = strings.ReplaceAll(result, "{{Name}}", fmt.Sprintf("%v.%v.%v", packageName, thisStructName, method.Name))
comments := strings.TrimSpace(method.DocComment)
if comments != "" {
comments = "// " + comments + "\n"
}
result = strings.ReplaceAll(result, "Comments", comments)
var params string
for _, input := range method.Inputs {
inputName := sanitiseJSVarName(input.Name)
pkgName := getPackageName(input)
if pkgName != "" {
models = append(models, pkgName)
}
if input.Type.IsStruct || input.Type.IsEnum {
if _, ok := externalStructs[input.Type.Package]; !ok {
externalStructs[input.Type.Package] = make(map[string]*ExternalStruct)
}
externalStructs[input.Type.Package][input.Type.Name] = &ExternalStruct{
Package: input.Type.Package,
Name: input.Type.Name,
}
}
params += ", " + inputName
}
result = strings.ReplaceAll(result, "{{params}}", params)
//if len(params) > 0 {
// params = "\n" + params
//}
var inputs string
for _, input := range method.Inputs {
pkgName := getPackageName(input)
if pkgName != "" {
models = append(models, pkgName)
}
inputs += sanitiseJSVarName(input.Name) + ": " + input.JSType(packageName) + ", "
}
inputs = strings.TrimSuffix(inputs, ", ")
args := inputs
if len(args) > 0 {
args = ", " + args
}
result = strings.ReplaceAll(result, "{{inputs}}", inputs)
result = strings.ReplaceAll(result, "{{args}}", args)
// outputs
var returns string
if len(method.Outputs) == 0 {
returns = "Promise<void>"
} else {
returns = "Promise<"
for _, output := range method.Outputs {
pkgName := getPackageName(output)
if pkgName != "" {
models = append(models, pkgName)
}
jsType := output.JSType(packageName)
if jsType == "error" {
jsType = "void"
}
if output.Type.IsStruct {
if _, ok := externalStructs[output.Type.Package]; !ok {
externalStructs[output.Type.Package] = make(map[string]*ExternalStruct)
}
externalStructs[output.Type.Package][output.Type.Name] = &ExternalStruct{
Package: output.Type.Package,
Name: output.Type.Name,
}
jsType = output.NamespacedStructVariable(output.Type.Package)
}
returns += jsType + ", "
}
returns = strings.TrimSuffix(returns, ", ")
returns += ">"
}
result = strings.ReplaceAll(result, "{{ReturnType}}", returns)
return result, lo.Uniq(models), externalStructs
}
func getPackageName(input *Parameter) string {
if !input.Type.IsStruct {
return ""
@ -230,37 +337,7 @@ func getPackageName(input *Parameter) string {
return result
}
func normalisePackageNames(packageNames []string) map[string]string {
// We iterate over the package names and determine if any of them
// have a forward slash. If this is the case, we assume that the
// package name is the last element of the path. If this has already
// been found, then we need to add a digit to the end of the package
// name to make it unique. We return a map of the original package
// name to the new package name.
var result = make(map[string]string)
var packagesConverted = make(map[string]struct{})
var count = 1
for _, packageName := range packageNames {
var originalPackageName = packageName
if strings.Contains(packageName, "/") {
parts := strings.Split(packageName, "/")
packageName = parts[len(parts)-1]
}
if _, ok := packagesConverted[packageName]; ok {
// We've already seen this package name. Add a digit
// to the end of the package name to make it unique
count += 1
packageName += strconv.Itoa(count)
}
packagesConverted[packageName] = struct{}{}
result[originalPackageName] = packageName
}
return result
}
func (p *Project) GenerateBindings(bindings map[string]map[string][]*BoundMethod, useIDs bool) map[string]map[string]string {
func (p *Project) GenerateBindings(bindings map[string]map[string][]*BoundMethod, useIDs bool, useTypescript bool) map[string]map[string]string {
var result = make(map[string]map[string]string)
@ -288,7 +365,11 @@ func (p *Project) GenerateBindings(bindings map[string]map[string][]*BoundMethod
var thisBinding string
var models []string
for _, method := range methods {
thisBinding, models, namespacedStructs = GenerateBinding(structName, method, useIDs)
if useTypescript {
thisBinding, models, namespacedStructs = GenerateBindingTypescript(structName, method, useIDs)
} else {
thisBinding, models, namespacedStructs = GenerateBinding(structName, method, useIDs)
}
// Merge the namespaced structs
allNamespacedStructs = mergeNamespacedStructs(allNamespacedStructs, namespacedStructs)
allModels = append(allModels, models...)
@ -297,27 +378,58 @@ func (p *Project) GenerateBindings(bindings map[string]map[string][]*BoundMethod
if len(allNamespacedStructs) > 0 {
thisPkg := p.packageCache[packageName]
typedefs := "/**\n"
for externalPackageName, namespacedStruct := range allNamespacedStructs {
pkgInfo := p.packageCache[externalPackageName]
relativePackageDir := p.RelativeBindingsDir(thisPkg, pkgInfo)
namePrefix := ""
if pkgInfo.Name != "" && pkgInfo.Path != thisPkg.Path {
namePrefix = pkgInfo.Name
}
if !useTypescript {
typedefs := "/**\n"
for externalPackageName, namespacedStruct := range allNamespacedStructs {
pkgInfo := p.packageCache[externalPackageName]
relativePackageDir := p.RelativeBindingsDir(thisPkg, pkgInfo)
namePrefix := ""
if pkgInfo.Name != "" && pkgInfo.Path != thisPkg.Path {
namePrefix = pkgInfo.Name
}
// Get keys from namespacedStruct and iterate over them in sorted order
namespacedStructNames := lo.Keys(namespacedStruct)
sort.Strings(namespacedStructNames)
for _, thisStructName := range namespacedStructNames {
structInfo := namespacedStruct[thisStructName]
typedefs += " * @typedef {import('" + relativePackageDir + "/models')." + thisStructName + "} " + namePrefix + structInfo.Name + "\n"
// Get keys from namespacedStruct and iterate over them in sorted order
namespacedStructNames := lo.Keys(namespacedStruct)
sort.Strings(namespacedStructNames)
for _, thisStructName := range namespacedStructNames {
structInfo := namespacedStruct[thisStructName]
typedefs += " * @typedef {import('" + relativePackageDir + "/models')." + thisStructName + "} " + namePrefix + structInfo.Name + "\n"
}
}
typedefs += " */\n"
result[relativePackageDir][structName] = typedefs + result[relativePackageDir][structName]
} else {
// Generate imports instead of typedefs
imports := ""
for externalPackageName, namespacedStruct := range allNamespacedStructs {
pkgInfo := p.packageCache[externalPackageName]
relativePackageDir := p.RelativeBindingsDir(thisPkg, pkgInfo)
namePrefix := ""
if pkgInfo.Name != "" && pkgInfo.Path != thisPkg.Path {
namePrefix = pkgInfo.Name
}
// Get keys from namespacedStruct and iterate over them in sorted order
namespacedStructNames := lo.Keys(namespacedStruct)
sort.Strings(namespacedStructNames)
for _, thisStructName := range namespacedStructNames {
structInfo := namespacedStruct[thisStructName]
if namePrefix != "" {
imports += "import {" + thisStructName + " as " + namePrefix + structInfo.Name + "} from '" + relativePackageDir + "/models';\n"
} else {
imports += "import {" + thisStructName + "} from '" + relativePackageDir + "/models';\n"
}
}
}
imports += "\n"
result[relativePackageDir][structName] = imports + result[relativePackageDir][structName]
}
typedefs += " */\n"
result[relativePackageDir][structName] = typedefs + result[relativePackageDir][structName]
}
result[relativePackageDir][structName] = header + result[relativePackageDir][structName]
if useTypescript {
result[relativePackageDir][structName] = headerTypescript + result[relativePackageDir][structName]
} else {
result[relativePackageDir][structName] = header + result[relativePackageDir][structName]
}
}
}

View File

@ -16,7 +16,7 @@ func getFile(filename string) string {
// get the file from the testdata FS
file, err := fs.ReadFile(testdata, filename)
if err != nil {
panic(err)
return ""
}
return string(file)
}
@ -24,12 +24,15 @@ func getFile(filename string) string {
func TestGenerateBindings(t *testing.T) {
tests := []struct {
dir string
want map[string]map[string]string
useIDs bool
name string
dir string
want map[string]map[string]string
useIDs bool
useTypescript bool
}{
{
dir: "testdata/enum",
name: "enum",
dir: "testdata/enum",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/enum/frontend/bindings/main/GreetService.js"),
@ -38,7 +41,30 @@ func TestGenerateBindings(t *testing.T) {
useIDs: true,
},
{
dir: "testdata/enum",
name: "enum - Typescript - CallByID",
dir: "testdata/enum",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/enum/frontend/bindings/main/GreetService.ts"),
},
},
useIDs: true,
useTypescript: true,
},
{
name: "enum - Typescript - CallByName",
dir: "testdata/enum",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/enum/frontend/bindings/main/GreetService.name.ts"),
},
},
useIDs: false,
useTypescript: true,
},
{
name: "enum",
dir: "testdata/enum",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/enum/frontend/bindings/main/GreetService.name.js"),
@ -46,7 +72,8 @@ func TestGenerateBindings(t *testing.T) {
},
},
{
dir: "testdata/enum_from_imported_package",
name: "enum_from_imported_package",
dir: "testdata/enum_from_imported_package",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/enum_from_imported_package/frontend/bindings/main/GreetService.name.js"),
@ -54,7 +81,8 @@ func TestGenerateBindings(t *testing.T) {
},
},
{
dir: "testdata/enum_from_imported_package",
name: "enum_from_imported_package",
dir: "testdata/enum_from_imported_package",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/enum_from_imported_package/frontend/bindings/main/GreetService.js"),
@ -63,7 +91,30 @@ func TestGenerateBindings(t *testing.T) {
useIDs: true,
},
{
dir: "testdata/function_single",
name: "enum_from_imported_package - Typescript - CallByID",
dir: "testdata/enum_from_imported_package",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/enum_from_imported_package/frontend/bindings/main/GreetService.ts"),
},
},
useIDs: true,
useTypescript: true,
},
{
name: "enum_from_imported_package - Typescript - CallByName",
dir: "testdata/enum_from_imported_package",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/enum_from_imported_package/frontend/bindings/main/GreetService.name.ts"),
},
},
useIDs: false,
useTypescript: true,
},
{
name: "function_single",
dir: "testdata/function_single",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/function_single/frontend/bindings/main/GreetService.js"),
@ -72,7 +123,8 @@ func TestGenerateBindings(t *testing.T) {
useIDs: true,
},
{
dir: "testdata/function_single",
name: "function_single",
dir: "testdata/function_single",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/function_single/frontend/bindings/main/GreetService.name.js"),
@ -81,7 +133,30 @@ func TestGenerateBindings(t *testing.T) {
useIDs: false,
},
{
dir: "testdata/function_from_imported_package",
name: "function single - Typescript - CallByID",
dir: "testdata/function_single",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/function_single/frontend/bindings/main/GreetService.ts"),
},
},
useIDs: true,
useTypescript: true,
},
{
name: "function single - Typescript - CallByName",
dir: "testdata/function_single",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/function_single/frontend/bindings/main/GreetService.name.ts"),
},
},
useIDs: false,
useTypescript: true,
},
{
name: "function_from_imported_package",
dir: "testdata/function_from_imported_package",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/function_from_imported_package/frontend/bindings/main/GreetService.name.js"),
@ -93,7 +168,8 @@ func TestGenerateBindings(t *testing.T) {
useIDs: false,
},
{
dir: "testdata/function_from_imported_package",
name: "function_from_imported_package",
dir: "testdata/function_from_imported_package",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/function_from_imported_package/frontend/bindings/main/GreetService.js"),
@ -105,7 +181,36 @@ func TestGenerateBindings(t *testing.T) {
useIDs: true,
},
{
dir: "testdata/function_from_nested_imported_package",
name: "function_from_imported_package - Typescript - CallByID",
dir: "testdata/function_from_imported_package",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/function_from_imported_package/frontend/bindings/main/GreetService.ts"),
},
"services": {
"OtherService": getFile("testdata/function_from_imported_package/frontend/bindings/services/OtherService.ts"),
},
},
useIDs: true,
useTypescript: true,
},
{
name: "function_from_imported_package - Typescript - CallByName",
dir: "testdata/function_from_imported_package",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/function_from_imported_package/frontend/bindings/main/GreetService.name.ts"),
},
"services": {
"OtherService": getFile("testdata/function_from_imported_package/frontend/bindings/services/OtherService.name.ts"),
},
},
useIDs: false,
useTypescript: true,
},
{
name: "function_from_nested_imported_package",
dir: "testdata/function_from_nested_imported_package",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/function_from_nested_imported_package/frontend/bindings/main/GreetService.name.js"),
@ -117,7 +222,8 @@ func TestGenerateBindings(t *testing.T) {
useIDs: false,
},
{
dir: "testdata/function_from_nested_imported_package",
name: "function_from_nested_imported_package",
dir: "testdata/function_from_nested_imported_package",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/function_from_nested_imported_package/frontend/bindings/main/GreetService.js"),
@ -129,7 +235,36 @@ func TestGenerateBindings(t *testing.T) {
useIDs: true,
},
{
dir: "testdata/struct_literal_multiple",
name: "function_from_nested_imported_package - Typescript - CallByID",
dir: "testdata/function_from_nested_imported_package",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/function_from_nested_imported_package/frontend/bindings/main/GreetService.ts"),
},
"services/other": {
"OtherService": getFile("testdata/function_from_nested_imported_package/frontend/bindings/services/other/OtherService.ts"),
},
},
useIDs: true,
useTypescript: true,
},
{
name: "function_from_nested_imported_package - Typescript - CallByName",
dir: "testdata/function_from_nested_imported_package",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/function_from_nested_imported_package/frontend/bindings/main/GreetService.name.ts"),
},
"services/other": {
"OtherService": getFile("testdata/function_from_nested_imported_package/frontend/bindings/services/other/OtherService.name.ts"),
},
},
useIDs: false,
useTypescript: true,
},
{
name: "struct_literal_multiple",
dir: "testdata/struct_literal_multiple",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/struct_literal_multiple/frontend/bindings/main/GreetService.js"),
@ -139,7 +274,8 @@ func TestGenerateBindings(t *testing.T) {
useIDs: true,
},
{
dir: "testdata/struct_literal_multiple",
name: "struct_literal_multiple",
dir: "testdata/struct_literal_multiple",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/struct_literal_multiple/frontend/bindings/main/GreetService.name.js"),
@ -149,7 +285,8 @@ func TestGenerateBindings(t *testing.T) {
useIDs: false,
},
{
dir: "testdata/function_from_imported_package",
name: "function_from_imported_package",
dir: "testdata/function_from_imported_package",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/function_from_imported_package/frontend/bindings/main/GreetService.js"),
@ -161,7 +298,8 @@ func TestGenerateBindings(t *testing.T) {
useIDs: true,
},
{
dir: "testdata/function_from_imported_package",
name: "function_from_imported_package",
dir: "testdata/function_from_imported_package",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/function_from_imported_package/frontend/bindings/main/GreetService.name.js"),
@ -173,7 +311,8 @@ func TestGenerateBindings(t *testing.T) {
useIDs: false,
},
{
dir: "testdata/variable_single",
name: "variable_single",
dir: "testdata/variable_single",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/variable_single/frontend/bindings/main/GreetService.name.js"),
@ -182,7 +321,8 @@ func TestGenerateBindings(t *testing.T) {
useIDs: false,
},
{
dir: "testdata/variable_single",
name: "variable_single",
dir: "testdata/variable_single",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/variable_single/frontend/bindings/main/GreetService.js"),
@ -191,7 +331,30 @@ func TestGenerateBindings(t *testing.T) {
useIDs: true,
},
{
dir: "testdata/variable_single_from_function",
name: "variable_single - Typescript - CallByID",
dir: "testdata/variable_single",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/variable_single/frontend/bindings/main/GreetService.ts"),
},
},
useIDs: true,
useTypescript: true,
},
{
name: "variable_single - Typescript - CallByName",
dir: "testdata/variable_single",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/variable_single/frontend/bindings/main/GreetService.name.ts"),
},
},
useIDs: false,
useTypescript: true,
},
{
name: "variable_single_from_function",
dir: "testdata/variable_single_from_function",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/variable_single_from_function/frontend/bindings/main/GreetService.name.js"),
@ -200,7 +363,8 @@ func TestGenerateBindings(t *testing.T) {
useIDs: false,
},
{
dir: "testdata/variable_single_from_function",
name: "variable_single_from_function",
dir: "testdata/variable_single_from_function",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/variable_single_from_function/frontend/bindings/main/GreetService.js"),
@ -209,7 +373,30 @@ func TestGenerateBindings(t *testing.T) {
useIDs: true,
},
{
dir: "testdata/variable_single_from_other_function",
name: "variable_single_from_function - Typescript - CallByID",
dir: "testdata/variable_single_from_function",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/variable_single_from_function/frontend/bindings/main/GreetService.ts"),
},
},
useIDs: true,
useTypescript: true,
},
{
name: "variable_single_from_function - Typescript - CallByName",
dir: "testdata/variable_single_from_function",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/variable_single_from_function/frontend/bindings/main/GreetService.name.ts"),
},
},
useIDs: false,
useTypescript: true,
},
{
name: "variable_single_from_other_function",
dir: "testdata/variable_single_from_other_function",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/variable_single_from_other_function/frontend/bindings/main/GreetService.name.js"),
@ -221,7 +408,8 @@ func TestGenerateBindings(t *testing.T) {
useIDs: false,
},
{
dir: "testdata/variable_single_from_other_function",
name: "variable_single_from_other_function",
dir: "testdata/variable_single_from_other_function",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/variable_single_from_other_function/frontend/bindings/main/GreetService.js"),
@ -233,7 +421,36 @@ func TestGenerateBindings(t *testing.T) {
useIDs: true,
},
{
dir: "testdata/struct_literal_single",
name: "variable_single_from_other_function - Typescript - CallByID",
dir: "testdata/variable_single_from_other_function",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/variable_single_from_other_function/frontend/bindings/main/GreetService.ts"),
},
"services": {
"OtherService": getFile("testdata/variable_single_from_other_function/frontend/bindings/services/OtherService.ts"),
},
},
useIDs: true,
useTypescript: true,
},
{
name: "variable_single_from_other_function - Typescript - CallByName",
dir: "testdata/variable_single_from_other_function",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/variable_single_from_other_function/frontend/bindings/main/GreetService.name.ts"),
},
"services": {
"OtherService": getFile("testdata/variable_single_from_other_function/frontend/bindings/services/OtherService.name.ts"),
},
},
useIDs: false,
useTypescript: true,
},
{
name: "struct_literal_single",
dir: "testdata/struct_literal_single",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/struct_literal_single/frontend/bindings/main/GreetService.name.js"),
@ -242,7 +459,8 @@ func TestGenerateBindings(t *testing.T) {
useIDs: false,
},
{
dir: "testdata/struct_literal_single",
name: "struct_literal_single",
dir: "testdata/struct_literal_single",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/struct_literal_single/frontend/bindings/main/GreetService.js"),
@ -251,7 +469,30 @@ func TestGenerateBindings(t *testing.T) {
useIDs: true,
},
{
dir: "testdata/struct_literal_multiple_other",
name: "struct_literal_single - Typescript - CallByID",
dir: "testdata/struct_literal_single",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/struct_literal_single/frontend/bindings/main/GreetService.ts"),
},
},
useIDs: true,
useTypescript: true,
},
{
name: "struct_literal_single - Typescript - CallByName",
dir: "testdata/struct_literal_single",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/struct_literal_single/frontend/bindings/main/GreetService.name.ts"),
},
},
useIDs: false,
useTypescript: true,
},
{
name: "struct_literal_multiple_other",
dir: "testdata/struct_literal_multiple_other",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/struct_literal_multiple_other/frontend/bindings/main/GreetService.name.js"),
@ -263,7 +504,8 @@ func TestGenerateBindings(t *testing.T) {
useIDs: false,
},
{
dir: "testdata/struct_literal_multiple_other",
name: "struct_literal_multiple_other",
dir: "testdata/struct_literal_multiple_other",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/struct_literal_multiple_other/frontend/bindings/main/GreetService.js"),
@ -275,7 +517,36 @@ func TestGenerateBindings(t *testing.T) {
useIDs: true,
},
{
dir: "testdata/struct_literal_non_pointer_single",
name: "struct_literal_multiple_other - Typescript - CallByID",
dir: "testdata/struct_literal_multiple_other",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/struct_literal_multiple_other/frontend/bindings/main/GreetService.ts"),
},
"services": {
"OtherService": getFile("testdata/struct_literal_multiple_other/frontend/bindings/services/OtherService.ts"),
},
},
useIDs: true,
useTypescript: true,
},
{
name: "struct_literal_multiple_other - Typescript - CallByName",
dir: "testdata/struct_literal_multiple_other",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/struct_literal_multiple_other/frontend/bindings/main/GreetService.name.ts"),
},
"services": {
"OtherService": getFile("testdata/struct_literal_multiple_other/frontend/bindings/services/OtherService.name.ts"),
},
},
useIDs: false,
useTypescript: true,
},
{
name: "struct_literal_non_pointer_single",
dir: "testdata/struct_literal_non_pointer_single",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/struct_literal_non_pointer_single/frontend/bindings/main/GreetService.name.js"),
@ -284,7 +555,8 @@ func TestGenerateBindings(t *testing.T) {
useIDs: false,
},
{
dir: "testdata/struct_literal_non_pointer_single",
name: "struct_literal_non_pointer_single",
dir: "testdata/struct_literal_non_pointer_single",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/struct_literal_non_pointer_single/frontend/bindings/main/GreetService.js"),
@ -293,7 +565,30 @@ func TestGenerateBindings(t *testing.T) {
useIDs: true,
},
{
dir: "testdata/struct_literal_multiple_files",
name: "struct_literal_non_pointer_single - Typescript - CallByID",
dir: "testdata/struct_literal_non_pointer_single",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/struct_literal_non_pointer_single/frontend/bindings/main/GreetService.ts"),
},
},
useIDs: true,
useTypescript: true,
},
{
name: "struct_literal_non_pointer_single - Typescript - CallByName",
dir: "testdata/struct_literal_non_pointer_single",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/struct_literal_non_pointer_single/frontend/bindings/main/GreetService.name.ts"),
},
},
useIDs: false,
useTypescript: true,
},
{
name: "struct_literal_multiple_files",
dir: "testdata/struct_literal_multiple_files",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/struct_literal_multiple_files/frontend/bindings/main/GreetService.name.js"),
@ -303,7 +598,8 @@ func TestGenerateBindings(t *testing.T) {
useIDs: false,
},
{
dir: "testdata/struct_literal_multiple_files",
name: "struct_literal_multiple_files",
dir: "testdata/struct_literal_multiple_files",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/struct_literal_multiple_files/frontend/bindings/main/GreetService.js"),
@ -312,9 +608,33 @@ func TestGenerateBindings(t *testing.T) {
},
useIDs: true,
},
{
name: "struct_literal_multiple_files - Typescript - CallByID",
dir: "testdata/struct_literal_multiple_files",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/struct_literal_multiple_files/frontend/bindings/main/GreetService.ts"),
"OtherService": getFile("testdata/struct_literal_multiple_files/frontend/bindings/main/OtherService.ts"),
},
},
useIDs: true,
useTypescript: true,
},
{
name: "struct_literal_multiple_files - Typescript - CallByName",
dir: "testdata/struct_literal_multiple_files",
want: map[string]map[string]string{
"main": {
"GreetService": getFile("testdata/struct_literal_multiple_files/frontend/bindings/main/GreetService.name.ts"),
"OtherService": getFile("testdata/struct_literal_multiple_files/frontend/bindings/main/OtherService.name.ts"),
},
},
useIDs: false,
useTypescript: true,
},
}
for _, tt := range tests {
t.Run(tt.dir, func(t *testing.T) {
t.Run(tt.name, func(t *testing.T) {
// Run parser on directory
absDir, err := filepath.Abs(tt.dir)
if err != nil {
@ -330,21 +650,37 @@ func TestGenerateBindings(t *testing.T) {
project.outputDirectory = "frontend/bindings"
// Generate Bindings
got := project.GenerateBindings(project.BoundMethods, tt.useIDs)
got := project.GenerateBindings(project.BoundMethods, tt.useIDs, tt.useTypescript)
for dirName, structDetails := range got {
// iterate the struct names in structDetails
for name, binding := range structDetails {
expected, ok := tt.want[dirName][name]
if !ok {
outFile := filepath.Join(tt.dir, project.outputDirectory, dirName, name+".got.js")
outFileName := name + ".got.js"
originalFilename := name + ".js"
if tt.useTypescript {
if tt.useIDs {
originalFilename = name + ".ts"
} else {
originalFilename = name + ".name.ts"
}
outFileName = name + ".got.ts"
}
originalFile := filepath.Join(tt.dir, project.outputDirectory, dirName, originalFilename)
// Check if file exists
if _, err := os.Stat(originalFile); err != nil {
outFileName = originalFilename
}
outFile := filepath.Join(tt.dir, project.outputDirectory, dirName, outFileName)
err = os.WriteFile(outFile, []byte(binding), 0644)
if err != nil {
t.Errorf("os.WriteFile() error = %v", err)
return
continue
}
t.Errorf("GenerateBindings() unexpected binding = %v", name)
return
continue
}
// compare the binding
@ -353,13 +689,29 @@ func TestGenerateBindings(t *testing.T) {
expected = convertLineEndings(expected)
if diff := cmp.Diff(expected, binding); diff != "" {
outFile := filepath.Join(tt.dir, project.outputDirectory, dirName, name+".got.js")
outFileName := name + ".got.js"
originalFilename := name + ".js"
if tt.useTypescript {
if tt.useIDs {
originalFilename = name + ".ts"
} else {
originalFilename = name + ".name.ts"
}
outFileName = name + ".got.ts"
}
originalFile := filepath.Join(tt.dir, project.outputDirectory, dirName, originalFilename)
// Check if file exists
if _, err := os.Stat(originalFile); err != nil {
outFileName = originalFilename
}
outFile := filepath.Join(tt.dir, project.outputDirectory, dirName, outFileName)
err = os.WriteFile(outFile, []byte(binding), 0644)
if err != nil {
t.Errorf("os.WriteFile() error = %v", err)
return
continue
}
t.Fatalf("GenerateBindings() mismatch (-want +got):\n%s", diff)
t.Errorf("GenerateBindings() mismatch (-want +got):\n%s", diff)
}
}
}

View File

@ -331,7 +331,7 @@ func GenerateBindingsAndModels(options *flags.GenerateBindingsOptions) error {
}
p.Stats.NumMethods = len(p.BoundMethods)
p.outputDirectory = options.OutputDirectory
generatedMethods := p.GenerateBindings(p.BoundMethods, options.UseIDs)
generatedMethods := p.GenerateBindings(p.BoundMethods, options.UseIDs, options.TS)
for pkg, structs := range generatedMethods {
// Write the directory
err = os.MkdirAll(filepath.Join(options.OutputDirectory, pkg), 0755)
@ -340,7 +340,11 @@ func GenerateBindingsAndModels(options *flags.GenerateBindingsOptions) error {
}
// Write the files
for structName, text := range structs {
err = os.WriteFile(filepath.Join(options.OutputDirectory, pkg, structName+".js"), []byte(text), 0644)
filename := structName + ".js"
if options.TS {
filename = structName + ".ts"
}
err = os.WriteFile(filepath.Join(options.OutputDirectory, pkg, filename), []byte(text), 0644)
if err != nil {
return err
}

View File

@ -14,7 +14,7 @@
* @param title {Title}
* @returns {Promise<string>}
**/
export function Greet(name, title) {
export async function Greet(name, title) {
return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0));
}
@ -24,6 +24,6 @@ export function Greet(name, title) {
* @param name {string}
* @returns {Promise<Person>}
**/
export function NewPerson(name) {
export async function NewPerson(name) {
return wails.CallByID(1661412647, ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -14,7 +14,7 @@
* @param title {Title}
* @returns {Promise<string>}
**/
export function Greet(name, title) {
export async function Greet(name, title) {
return wails.CallByName("main.GreetService.Greet", ...Array.prototype.slice.call(arguments, 0));
}
@ -24,6 +24,6 @@ export function Greet(name, title) {
* @param name {string}
* @returns {Promise<Person>}
**/
export function NewPerson(name) {
export async function NewPerson(name) {
return wails.CallByName("main.GreetService.NewPerson", ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -0,0 +1,16 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {Person} from './models';
import {Title} from './models';
// Greet does XYZ
export async function Greet(name: string, title: Title) : Promise<string> {
return wails.CallByName("main.GreetService.Greet", name, title);
}
// NewPerson creates a new person
export async function NewPerson(name: string) : Promise<Person> {
return wails.CallByName("main.GreetService.NewPerson", name);
}

View File

@ -0,0 +1,16 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {Person} from './models';
import {Title} from './models';
// Greet does XYZ
export async function Greet(name: string, title: Title) : Promise<string> {
return wails.CallByID(1411160069, name, title);
}
// NewPerson creates a new person
export async function NewPerson(name: string) : Promise<Person> {
return wails.CallByID(1661412647, name);
}

View File

@ -13,6 +13,6 @@
* @param title {servicesTitle}
* @returns {Promise<string>}
**/
export function Greet(name, title) {
export async function Greet(name, title) {
return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -13,6 +13,6 @@
* @param title {servicesTitle}
* @returns {Promise<string>}
**/
export function Greet(name, title) {
export async function Greet(name, title) {
return wails.CallByName("main.GreetService.Greet", ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -0,0 +1,10 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {Title as servicesTitle} from '../services/models';
// Greet does XYZ
export async function Greet(name: string, title: servicesTitle) : Promise<string> {
return wails.CallByName("main.GreetService.Greet", name, title);
}

View File

@ -0,0 +1,10 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {Title as servicesTitle} from '../services/models';
// Greet does XYZ
export async function Greet(name: string, title: servicesTitle) : Promise<string> {
return wails.CallByID(1411160069, name, title);
}

View File

@ -12,7 +12,7 @@
* @param name {string}
* @returns {Promise<string>}
**/
export function Greet(name) {
export async function Greet(name) {
return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0));
}
@ -22,6 +22,6 @@ export function Greet(name) {
* @param name {string}
* @returns {Promise<Person>}
**/
export function NewPerson(name) {
export async function NewPerson(name) {
return wails.CallByID(1661412647, ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -12,7 +12,7 @@
* @param name {string}
* @returns {Promise<string>}
**/
export function Greet(name) {
export async function Greet(name) {
return wails.CallByName("main.GreetService.Greet", ...Array.prototype.slice.call(arguments, 0));
}
@ -22,6 +22,6 @@ export function Greet(name) {
* @param name {string}
* @returns {Promise<Person>}
**/
export function NewPerson(name) {
export async function NewPerson(name) {
return wails.CallByName("main.GreetService.NewPerson", ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -0,0 +1,15 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {Person} from './models';
// Greet does XYZ
export async function Greet(name: string) : Promise<string> {
return wails.CallByName("main.GreetService.Greet", name);
}
// NewPerson creates a new person
export async function NewPerson(name: string) : Promise<Person> {
return wails.CallByName("main.GreetService.NewPerson", name);
}

View File

@ -0,0 +1,15 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {Person} from './models';
// Greet does XYZ
export async function Greet(name: string) : Promise<string> {
return wails.CallByID(1411160069, name);
}
// NewPerson creates a new person
export async function NewPerson(name: string) : Promise<Person> {
return wails.CallByID(1661412647, name);
}

View File

@ -11,6 +11,6 @@
* @function Yay
* @returns {Promise<Address>}
**/
export function Yay() {
export async function Yay() {
return wails.CallByID(1592414782, ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -11,6 +11,6 @@
* @function Yay
* @returns {Promise<Address>}
**/
export function Yay() {
export async function Yay() {
return wails.CallByName("services.OtherService.Yay", ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -0,0 +1,10 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {Address} from './models';
// Yay does this and that
export async function Yay() : Promise<Address> {
return wails.CallByName("services.OtherService.Yay");
}

View File

@ -0,0 +1,10 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {Address} from './models';
// Yay does this and that
export async function Yay() : Promise<Address> {
return wails.CallByID(1592414782);
}

View File

@ -12,7 +12,7 @@
* @param name {string}
* @returns {Promise<string>}
**/
export function Greet(name) {
export async function Greet(name) {
return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0));
}
@ -22,6 +22,6 @@ export function Greet(name) {
* @param name {string}
* @returns {Promise<Person>}
**/
export function NewPerson(name) {
export async function NewPerson(name) {
return wails.CallByID(1661412647, ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -12,7 +12,7 @@
* @param name {string}
* @returns {Promise<string>}
**/
export function Greet(name) {
export async function Greet(name) {
return wails.CallByName("main.GreetService.Greet", ...Array.prototype.slice.call(arguments, 0));
}
@ -22,6 +22,6 @@ export function Greet(name) {
* @param name {string}
* @returns {Promise<Person>}
**/
export function NewPerson(name) {
export async function NewPerson(name) {
return wails.CallByName("main.GreetService.NewPerson", ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -0,0 +1,15 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {Person} from './models';
// Greet does XYZ
export async function Greet(name: string) : Promise<string> {
return wails.CallByName("main.GreetService.Greet", name);
}
// NewPerson creates a new person
export async function NewPerson(name: string) : Promise<Person> {
return wails.CallByName("main.GreetService.NewPerson", name);
}

View File

@ -0,0 +1,15 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {Person} from './models';
// Greet does XYZ
export async function Greet(name: string) : Promise<string> {
return wails.CallByID(1411160069, name);
}
// NewPerson creates a new person
export async function NewPerson(name: string) : Promise<Person> {
return wails.CallByID(1661412647, name);
}

View File

@ -11,6 +11,6 @@
* @function Yay
* @returns {Promise<Address>}
**/
export function Yay() {
export async function Yay() {
return wails.CallByID(2189323817, ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -11,6 +11,6 @@
* @function Yay
* @returns {Promise<Address>}
**/
export function Yay() {
export async function Yay() {
return wails.CallByName("other.OtherService.Yay", ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -0,0 +1,10 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {Address} from './models';
// Yay does this and that
export async function Yay() : Promise<Address> {
return wails.CallByName("other.OtherService.Yay");
}

View File

@ -0,0 +1,10 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {Address} from './models';
// Yay does this and that
export async function Yay() : Promise<Address> {
return wails.CallByID(2189323817);
}

View File

@ -9,6 +9,6 @@
* @param name {string}
* @returns {Promise<string>}
**/
export function Greet(name) {
export async function Greet(name) {
return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -9,6 +9,6 @@
* @param name {string}
* @returns {Promise<string>}
**/
export function Greet(name) {
export async function Greet(name) {
return wails.CallByName("main.GreetService.Greet", ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -0,0 +1,8 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
// Greet someone
export async function Greet(name: string) : Promise<string> {
return wails.CallByName("main.GreetService.Greet", name);
}

View File

@ -0,0 +1,8 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
// Greet someone
export async function Greet(name: string) : Promise<string> {
return wails.CallByID(1411160069, name);
}

View File

@ -8,6 +8,6 @@
* @param name {string}
* @returns {Promise<string>}
**/
export function Greet(name) {
export async function Greet(name) {
return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -8,6 +8,6 @@
* @param name {string}
* @returns {Promise<string>}
**/
export function Greet(name) {
export async function Greet(name) {
return wails.CallByName("main.GreetService.Greet", ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -7,6 +7,6 @@
* @function Hello
* @returns {Promise<void>}
**/
export function Hello() {
export async function Hello() {
return wails.CallByID(4249972365, ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -7,6 +7,6 @@
* @function Hello
* @returns {Promise<void>}
**/
export function Hello() {
export async function Hello() {
return wails.CallByName("main.OtherService.Hello", ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -8,6 +8,6 @@
* @param name {string}
* @returns {Promise<string>}
**/
export function Greet(name) {
export async function Greet(name) {
return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -8,6 +8,6 @@
* @param name {string}
* @returns {Promise<string>}
**/
export function Greet(name) {
export async function Greet(name) {
return wails.CallByName("main.GreetService.Greet", ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -0,0 +1,7 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
export async function Greet(name: string) : Promise<string> {
return wails.CallByName("main.GreetService.Greet", name);
}

View File

@ -0,0 +1,7 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
export async function Greet(name: string) : Promise<string> {
return wails.CallByID(1411160069, name);
}

View File

@ -7,6 +7,6 @@
* @function Hello
* @returns {Promise<void>}
**/
export function Hello() {
export async function Hello() {
return wails.CallByID(4249972365, ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -7,6 +7,6 @@
* @function Hello
* @returns {Promise<void>}
**/
export function Hello() {
export async function Hello() {
return wails.CallByName("main.OtherService.Hello", ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -0,0 +1,7 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
export async function Hello() : Promise<void> {
return wails.CallByName("main.OtherService.Hello");
}

View File

@ -0,0 +1,7 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
export async function Hello() : Promise<void> {
return wails.CallByID(4249972365);
}

View File

@ -12,7 +12,7 @@
* @param name {string}
* @returns {Promise<string>}
**/
export function Greet(name) {
export async function Greet(name) {
return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0));
}
@ -22,6 +22,6 @@ export function Greet(name) {
* @param name {string}
* @returns {Promise<Person>}
**/
export function NewPerson(name) {
export async function NewPerson(name) {
return wails.CallByID(1661412647, ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -12,7 +12,7 @@
* @param name {string}
* @returns {Promise<string>}
**/
export function Greet(name) {
export async function Greet(name) {
return wails.CallByName("main.GreetService.Greet", ...Array.prototype.slice.call(arguments, 0));
}
@ -22,6 +22,6 @@ export function Greet(name) {
* @param name {string}
* @returns {Promise<Person>}
**/
export function NewPerson(name) {
export async function NewPerson(name) {
return wails.CallByName("main.GreetService.NewPerson", ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -0,0 +1,15 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {Person} from './models';
// Greet does XYZ
export async function Greet(name: string) : Promise<string> {
return wails.CallByName("main.GreetService.Greet", name);
}
// NewPerson creates a new person
export async function NewPerson(name: string) : Promise<Person> {
return wails.CallByName("main.GreetService.NewPerson", name);
}

View File

@ -0,0 +1,15 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {Person} from './models';
// Greet does XYZ
export async function Greet(name: string) : Promise<string> {
return wails.CallByID(1411160069, name);
}
// NewPerson creates a new person
export async function NewPerson(name: string) : Promise<Person> {
return wails.CallByID(1661412647, name);
}

View File

@ -11,6 +11,6 @@
* @function Yay
* @returns {Promise<Address>}
**/
export function Yay() {
export async function Yay() {
return wails.CallByID(469445984, ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -11,6 +11,6 @@
* @function Yay
* @returns {Promise<Address>}
**/
export function Yay() {
export async function Yay() {
return wails.CallByName("services.OtherService.Yay", ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -0,0 +1,10 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {Address} from './models';
// Yay does this and that
export async function Yay() : Promise<Address> {
return wails.CallByName("services.OtherService.Yay");
}

View File

@ -0,0 +1,10 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {Address} from './models';
// Yay does this and that
export async function Yay() : Promise<Address> {
return wails.CallByID(469445984);
}

View File

@ -11,7 +11,7 @@
* @param _in {number[]}
* @returns {Promise<void>}
**/
export function ArrayInt(_in) {
export async function ArrayInt(_in) {
return wails.CallByID(3862002418, ...Array.prototype.slice.call(arguments, 0));
}
@ -20,7 +20,7 @@ export function ArrayInt(_in) {
* @param _in {boolean}
* @returns {Promise<boolean>}
**/
export function BoolInBoolOut(_in) {
export async function BoolInBoolOut(_in) {
return wails.CallByID(2424639793, ...Array.prototype.slice.call(arguments, 0));
}
@ -29,7 +29,7 @@ export function BoolInBoolOut(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function Float32InFloat32Out(_in) {
export async function Float32InFloat32Out(_in) {
return wails.CallByID(3132595881, ...Array.prototype.slice.call(arguments, 0));
}
@ -38,7 +38,7 @@ export function Float32InFloat32Out(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function Float64InFloat64Out(_in) {
export async function Float64InFloat64Out(_in) {
return wails.CallByID(2182412247, ...Array.prototype.slice.call(arguments, 0));
}
@ -48,7 +48,7 @@ export function Float64InFloat64Out(_in) {
* @param name {string}
* @returns {Promise<string>}
**/
export function Greet(name) {
export async function Greet(name) {
return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0));
}
@ -57,7 +57,7 @@ export function Greet(name) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function Int16InIntOut(_in) {
export async function Int16InIntOut(_in) {
return wails.CallByID(3306292566, ...Array.prototype.slice.call(arguments, 0));
}
@ -66,7 +66,7 @@ export function Int16InIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function Int16PointerInAndOutput(_in) {
export async function Int16PointerInAndOutput(_in) {
return wails.CallByID(1754277916, ...Array.prototype.slice.call(arguments, 0));
}
@ -75,7 +75,7 @@ export function Int16PointerInAndOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function Int32InIntOut(_in) {
export async function Int32InIntOut(_in) {
return wails.CallByID(1909469092, ...Array.prototype.slice.call(arguments, 0));
}
@ -84,7 +84,7 @@ export function Int32InIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function Int32PointerInAndOutput(_in) {
export async function Int32PointerInAndOutput(_in) {
return wails.CallByID(4251088558, ...Array.prototype.slice.call(arguments, 0));
}
@ -93,7 +93,7 @@ export function Int32PointerInAndOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function Int64InIntOut(_in) {
export async function Int64InIntOut(_in) {
return wails.CallByID(1343888303, ...Array.prototype.slice.call(arguments, 0));
}
@ -102,7 +102,7 @@ export function Int64InIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function Int64PointerInAndOutput(_in) {
export async function Int64PointerInAndOutput(_in) {
return wails.CallByID(2205561041, ...Array.prototype.slice.call(arguments, 0));
}
@ -111,7 +111,7 @@ export function Int64PointerInAndOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function Int8InIntOut(_in) {
export async function Int8InIntOut(_in) {
return wails.CallByID(572240879, ...Array.prototype.slice.call(arguments, 0));
}
@ -120,7 +120,7 @@ export function Int8InIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function Int8PointerInAndOutput(_in) {
export async function Int8PointerInAndOutput(_in) {
return wails.CallByID(2189402897, ...Array.prototype.slice.call(arguments, 0));
}
@ -129,7 +129,7 @@ export function Int8PointerInAndOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function IntInIntOut(_in) {
export async function IntInIntOut(_in) {
return wails.CallByID(642881729, ...Array.prototype.slice.call(arguments, 0));
}
@ -138,7 +138,7 @@ export function IntInIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function IntPointerInAndOutput(_in) {
export async function IntPointerInAndOutput(_in) {
return wails.CallByID(1066151743, ...Array.prototype.slice.call(arguments, 0));
}
@ -147,7 +147,7 @@ export function IntPointerInAndOutput(_in) {
* @param _in {number | null}
* @returns {Promise<number | null, void>}
**/
export function IntPointerInputNamedOutputs(_in) {
export async function IntPointerInputNamedOutputs(_in) {
return wails.CallByID(2718999663, ...Array.prototype.slice.call(arguments, 0));
}
@ -156,7 +156,7 @@ export function IntPointerInputNamedOutputs(_in) {
* @param _in {map}
* @returns {Promise<void>}
**/
export function MapIntInt(_in) {
export async function MapIntInt(_in) {
return wails.CallByID(2386486356, ...Array.prototype.slice.call(arguments, 0));
}
@ -165,7 +165,7 @@ export function MapIntInt(_in) {
* @param _in {map}
* @returns {Promise<void>}
**/
export function MapIntPointerInt(_in) {
export async function MapIntPointerInt(_in) {
return wails.CallByID(550413585, ...Array.prototype.slice.call(arguments, 0));
}
@ -174,7 +174,7 @@ export function MapIntPointerInt(_in) {
* @param _in {map}
* @returns {Promise<void>}
**/
export function MapIntSliceInt(_in) {
export async function MapIntSliceInt(_in) {
return wails.CallByID(2900172572, ...Array.prototype.slice.call(arguments, 0));
}
@ -183,7 +183,7 @@ export function MapIntSliceInt(_in) {
* @param _in {map}
* @returns {Promise<map>}
**/
export function MapIntSliceIntInMapIntSliceIntOut(_in) {
export async function MapIntSliceIntInMapIntSliceIntOut(_in) {
return wails.CallByID(881980169, ...Array.prototype.slice.call(arguments, 0));
}
@ -191,7 +191,7 @@ export function MapIntSliceIntInMapIntSliceIntOut(_in) {
* @function NoInputsStringOut
* @returns {Promise<string>}
**/
export function NoInputsStringOut() {
export async function NoInputsStringOut() {
return wails.CallByID(1075577233, ...Array.prototype.slice.call(arguments, 0));
}
@ -200,7 +200,7 @@ export function NoInputsStringOut() {
* @param _in {boolean | null}
* @returns {Promise<boolean | null>}
**/
export function PointerBoolInBoolOut(_in) {
export async function PointerBoolInBoolOut(_in) {
return wails.CallByID(3589606958, ...Array.prototype.slice.call(arguments, 0));
}
@ -209,7 +209,7 @@ export function PointerBoolInBoolOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function PointerFloat32InFloat32Out(_in) {
export async function PointerFloat32InFloat32Out(_in) {
return wails.CallByID(224675106, ...Array.prototype.slice.call(arguments, 0));
}
@ -218,7 +218,7 @@ export function PointerFloat32InFloat32Out(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function PointerFloat64InFloat64Out(_in) {
export async function PointerFloat64InFloat64Out(_in) {
return wails.CallByID(2124953624, ...Array.prototype.slice.call(arguments, 0));
}
@ -227,7 +227,7 @@ export function PointerFloat64InFloat64Out(_in) {
* @param _in {map | null}
* @returns {Promise<void>}
**/
export function PointerMapIntInt(_in) {
export async function PointerMapIntInt(_in) {
return wails.CallByID(3516977899, ...Array.prototype.slice.call(arguments, 0));
}
@ -236,7 +236,7 @@ export function PointerMapIntInt(_in) {
* @param _in {string | null}
* @returns {Promise<string | null>}
**/
export function PointerStringInStringOut(_in) {
export async function PointerStringInStringOut(_in) {
return wails.CallByID(229603958, ...Array.prototype.slice.call(arguments, 0));
}
@ -245,7 +245,7 @@ export function PointerStringInStringOut(_in) {
* @param _in {string[]}
* @returns {Promise<string[]>}
**/
export function StringArrayInputNamedOutput(_in) {
export async function StringArrayInputNamedOutput(_in) {
return wails.CallByID(3678582682, ...Array.prototype.slice.call(arguments, 0));
}
@ -254,7 +254,7 @@ export function StringArrayInputNamedOutput(_in) {
* @param _in {string[]}
* @returns {Promise<string[], void>}
**/
export function StringArrayInputNamedOutputs(_in) {
export async function StringArrayInputNamedOutputs(_in) {
return wails.CallByID(319259595, ...Array.prototype.slice.call(arguments, 0));
}
@ -263,7 +263,7 @@ export function StringArrayInputNamedOutputs(_in) {
* @param _in {string[]}
* @returns {Promise<string[]>}
**/
export function StringArrayInputStringArrayOut(_in) {
export async function StringArrayInputStringArrayOut(_in) {
return wails.CallByID(383995060, ...Array.prototype.slice.call(arguments, 0));
}
@ -272,7 +272,7 @@ export function StringArrayInputStringArrayOut(_in) {
* @param _in {string[]}
* @returns {Promise<string>}
**/
export function StringArrayInputStringOut(_in) {
export async function StringArrayInputStringOut(_in) {
return wails.CallByID(1091960237, ...Array.prototype.slice.call(arguments, 0));
}
@ -281,7 +281,7 @@ export function StringArrayInputStringOut(_in) {
* @param _in {Person}
* @returns {Promise<Person>}
**/
export function StructInputStructOutput(_in) {
export async function StructInputStructOutput(_in) {
return wails.CallByID(3835643147, ...Array.prototype.slice.call(arguments, 0));
}
@ -290,7 +290,7 @@ export function StructInputStructOutput(_in) {
* @param _in {Person | null}
* @returns {Promise<void>}
**/
export function StructPointerInputErrorOutput(_in) {
export async function StructPointerInputErrorOutput(_in) {
return wails.CallByID(2447692557, ...Array.prototype.slice.call(arguments, 0));
}
@ -299,7 +299,7 @@ export function StructPointerInputErrorOutput(_in) {
* @param _in {Person | null}
* @returns {Promise<Person>}
**/
export function StructPointerInputStructPointerOutput(_in) {
export async function StructPointerInputStructPointerOutput(_in) {
return wails.CallByID(2943477349, ...Array.prototype.slice.call(arguments, 0));
}
@ -308,7 +308,7 @@ export function StructPointerInputStructPointerOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function UInt16InUIntOut(_in) {
export async function UInt16InUIntOut(_in) {
return wails.CallByID(3401034892, ...Array.prototype.slice.call(arguments, 0));
}
@ -317,7 +317,7 @@ export function UInt16InUIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function UInt16PointerInAndOutput(_in) {
export async function UInt16PointerInAndOutput(_in) {
return wails.CallByID(1236957573, ...Array.prototype.slice.call(arguments, 0));
}
@ -326,7 +326,7 @@ export function UInt16PointerInAndOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function UInt32InUIntOut(_in) {
export async function UInt32InUIntOut(_in) {
return wails.CallByID(1160383782, ...Array.prototype.slice.call(arguments, 0));
}
@ -335,7 +335,7 @@ export function UInt32InUIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function UInt32PointerInAndOutput(_in) {
export async function UInt32PointerInAndOutput(_in) {
return wails.CallByID(1739300671, ...Array.prototype.slice.call(arguments, 0));
}
@ -344,7 +344,7 @@ export function UInt32PointerInAndOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function UInt64InUIntOut(_in) {
export async function UInt64InUIntOut(_in) {
return wails.CallByID(793803239, ...Array.prototype.slice.call(arguments, 0));
}
@ -353,7 +353,7 @@ export function UInt64InUIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function UInt64PointerInAndOutput(_in) {
export async function UInt64PointerInAndOutput(_in) {
return wails.CallByID(1403757716, ...Array.prototype.slice.call(arguments, 0));
}
@ -362,7 +362,7 @@ export function UInt64PointerInAndOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function UInt8InUIntOut(_in) {
export async function UInt8InUIntOut(_in) {
return wails.CallByID(2988345717, ...Array.prototype.slice.call(arguments, 0));
}
@ -371,7 +371,7 @@ export function UInt8InUIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function UInt8PointerInAndOutput(_in) {
export async function UInt8PointerInAndOutput(_in) {
return wails.CallByID(518250834, ...Array.prototype.slice.call(arguments, 0));
}
@ -380,7 +380,7 @@ export function UInt8PointerInAndOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function UIntInUIntOut(_in) {
export async function UIntInUIntOut(_in) {
return wails.CallByID(2836661285, ...Array.prototype.slice.call(arguments, 0));
}
@ -389,6 +389,6 @@ export function UIntInUIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function UIntPointerInAndOutput(_in) {
export async function UIntPointerInAndOutput(_in) {
return wails.CallByID(1367187362, ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -11,7 +11,7 @@
* @param _in {number[]}
* @returns {Promise<void>}
**/
export function ArrayInt(_in) {
export async function ArrayInt(_in) {
return wails.CallByName("main.GreetService.ArrayInt", ...Array.prototype.slice.call(arguments, 0));
}
@ -20,7 +20,7 @@ export function ArrayInt(_in) {
* @param _in {boolean}
* @returns {Promise<boolean>}
**/
export function BoolInBoolOut(_in) {
export async function BoolInBoolOut(_in) {
return wails.CallByName("main.GreetService.BoolInBoolOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -29,7 +29,7 @@ export function BoolInBoolOut(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function Float32InFloat32Out(_in) {
export async function Float32InFloat32Out(_in) {
return wails.CallByName("main.GreetService.Float32InFloat32Out", ...Array.prototype.slice.call(arguments, 0));
}
@ -38,7 +38,7 @@ export function Float32InFloat32Out(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function Float64InFloat64Out(_in) {
export async function Float64InFloat64Out(_in) {
return wails.CallByName("main.GreetService.Float64InFloat64Out", ...Array.prototype.slice.call(arguments, 0));
}
@ -48,7 +48,7 @@ export function Float64InFloat64Out(_in) {
* @param name {string}
* @returns {Promise<string>}
**/
export function Greet(name) {
export async function Greet(name) {
return wails.CallByName("main.GreetService.Greet", ...Array.prototype.slice.call(arguments, 0));
}
@ -57,7 +57,7 @@ export function Greet(name) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function Int16InIntOut(_in) {
export async function Int16InIntOut(_in) {
return wails.CallByName("main.GreetService.Int16InIntOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -66,7 +66,7 @@ export function Int16InIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function Int16PointerInAndOutput(_in) {
export async function Int16PointerInAndOutput(_in) {
return wails.CallByName("main.GreetService.Int16PointerInAndOutput", ...Array.prototype.slice.call(arguments, 0));
}
@ -75,7 +75,7 @@ export function Int16PointerInAndOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function Int32InIntOut(_in) {
export async function Int32InIntOut(_in) {
return wails.CallByName("main.GreetService.Int32InIntOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -84,7 +84,7 @@ export function Int32InIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function Int32PointerInAndOutput(_in) {
export async function Int32PointerInAndOutput(_in) {
return wails.CallByName("main.GreetService.Int32PointerInAndOutput", ...Array.prototype.slice.call(arguments, 0));
}
@ -93,7 +93,7 @@ export function Int32PointerInAndOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function Int64InIntOut(_in) {
export async function Int64InIntOut(_in) {
return wails.CallByName("main.GreetService.Int64InIntOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -102,7 +102,7 @@ export function Int64InIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function Int64PointerInAndOutput(_in) {
export async function Int64PointerInAndOutput(_in) {
return wails.CallByName("main.GreetService.Int64PointerInAndOutput", ...Array.prototype.slice.call(arguments, 0));
}
@ -111,7 +111,7 @@ export function Int64PointerInAndOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function Int8InIntOut(_in) {
export async function Int8InIntOut(_in) {
return wails.CallByName("main.GreetService.Int8InIntOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -120,7 +120,7 @@ export function Int8InIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function Int8PointerInAndOutput(_in) {
export async function Int8PointerInAndOutput(_in) {
return wails.CallByName("main.GreetService.Int8PointerInAndOutput", ...Array.prototype.slice.call(arguments, 0));
}
@ -129,7 +129,7 @@ export function Int8PointerInAndOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function IntInIntOut(_in) {
export async function IntInIntOut(_in) {
return wails.CallByName("main.GreetService.IntInIntOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -138,7 +138,7 @@ export function IntInIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function IntPointerInAndOutput(_in) {
export async function IntPointerInAndOutput(_in) {
return wails.CallByName("main.GreetService.IntPointerInAndOutput", ...Array.prototype.slice.call(arguments, 0));
}
@ -147,7 +147,7 @@ export function IntPointerInAndOutput(_in) {
* @param _in {number | null}
* @returns {Promise<number | null, void>}
**/
export function IntPointerInputNamedOutputs(_in) {
export async function IntPointerInputNamedOutputs(_in) {
return wails.CallByName("main.GreetService.IntPointerInputNamedOutputs", ...Array.prototype.slice.call(arguments, 0));
}
@ -156,7 +156,7 @@ export function IntPointerInputNamedOutputs(_in) {
* @param _in {map}
* @returns {Promise<void>}
**/
export function MapIntInt(_in) {
export async function MapIntInt(_in) {
return wails.CallByName("main.GreetService.MapIntInt", ...Array.prototype.slice.call(arguments, 0));
}
@ -165,7 +165,7 @@ export function MapIntInt(_in) {
* @param _in {map}
* @returns {Promise<void>}
**/
export function MapIntPointerInt(_in) {
export async function MapIntPointerInt(_in) {
return wails.CallByName("main.GreetService.MapIntPointerInt", ...Array.prototype.slice.call(arguments, 0));
}
@ -174,7 +174,7 @@ export function MapIntPointerInt(_in) {
* @param _in {map}
* @returns {Promise<void>}
**/
export function MapIntSliceInt(_in) {
export async function MapIntSliceInt(_in) {
return wails.CallByName("main.GreetService.MapIntSliceInt", ...Array.prototype.slice.call(arguments, 0));
}
@ -183,7 +183,7 @@ export function MapIntSliceInt(_in) {
* @param _in {map}
* @returns {Promise<map>}
**/
export function MapIntSliceIntInMapIntSliceIntOut(_in) {
export async function MapIntSliceIntInMapIntSliceIntOut(_in) {
return wails.CallByName("main.GreetService.MapIntSliceIntInMapIntSliceIntOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -191,7 +191,7 @@ export function MapIntSliceIntInMapIntSliceIntOut(_in) {
* @function NoInputsStringOut
* @returns {Promise<string>}
**/
export function NoInputsStringOut() {
export async function NoInputsStringOut() {
return wails.CallByName("main.GreetService.NoInputsStringOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -200,7 +200,7 @@ export function NoInputsStringOut() {
* @param _in {boolean | null}
* @returns {Promise<boolean | null>}
**/
export function PointerBoolInBoolOut(_in) {
export async function PointerBoolInBoolOut(_in) {
return wails.CallByName("main.GreetService.PointerBoolInBoolOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -209,7 +209,7 @@ export function PointerBoolInBoolOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function PointerFloat32InFloat32Out(_in) {
export async function PointerFloat32InFloat32Out(_in) {
return wails.CallByName("main.GreetService.PointerFloat32InFloat32Out", ...Array.prototype.slice.call(arguments, 0));
}
@ -218,7 +218,7 @@ export function PointerFloat32InFloat32Out(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function PointerFloat64InFloat64Out(_in) {
export async function PointerFloat64InFloat64Out(_in) {
return wails.CallByName("main.GreetService.PointerFloat64InFloat64Out", ...Array.prototype.slice.call(arguments, 0));
}
@ -227,7 +227,7 @@ export function PointerFloat64InFloat64Out(_in) {
* @param _in {map | null}
* @returns {Promise<void>}
**/
export function PointerMapIntInt(_in) {
export async function PointerMapIntInt(_in) {
return wails.CallByName("main.GreetService.PointerMapIntInt", ...Array.prototype.slice.call(arguments, 0));
}
@ -236,7 +236,7 @@ export function PointerMapIntInt(_in) {
* @param _in {string | null}
* @returns {Promise<string | null>}
**/
export function PointerStringInStringOut(_in) {
export async function PointerStringInStringOut(_in) {
return wails.CallByName("main.GreetService.PointerStringInStringOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -245,7 +245,7 @@ export function PointerStringInStringOut(_in) {
* @param _in {string[]}
* @returns {Promise<string[]>}
**/
export function StringArrayInputNamedOutput(_in) {
export async function StringArrayInputNamedOutput(_in) {
return wails.CallByName("main.GreetService.StringArrayInputNamedOutput", ...Array.prototype.slice.call(arguments, 0));
}
@ -254,7 +254,7 @@ export function StringArrayInputNamedOutput(_in) {
* @param _in {string[]}
* @returns {Promise<string[], void>}
**/
export function StringArrayInputNamedOutputs(_in) {
export async function StringArrayInputNamedOutputs(_in) {
return wails.CallByName("main.GreetService.StringArrayInputNamedOutputs", ...Array.prototype.slice.call(arguments, 0));
}
@ -263,7 +263,7 @@ export function StringArrayInputNamedOutputs(_in) {
* @param _in {string[]}
* @returns {Promise<string[]>}
**/
export function StringArrayInputStringArrayOut(_in) {
export async function StringArrayInputStringArrayOut(_in) {
return wails.CallByName("main.GreetService.StringArrayInputStringArrayOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -272,7 +272,7 @@ export function StringArrayInputStringArrayOut(_in) {
* @param _in {string[]}
* @returns {Promise<string>}
**/
export function StringArrayInputStringOut(_in) {
export async function StringArrayInputStringOut(_in) {
return wails.CallByName("main.GreetService.StringArrayInputStringOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -281,7 +281,7 @@ export function StringArrayInputStringOut(_in) {
* @param _in {Person}
* @returns {Promise<Person>}
**/
export function StructInputStructOutput(_in) {
export async function StructInputStructOutput(_in) {
return wails.CallByName("main.GreetService.StructInputStructOutput", ...Array.prototype.slice.call(arguments, 0));
}
@ -290,7 +290,7 @@ export function StructInputStructOutput(_in) {
* @param _in {Person | null}
* @returns {Promise<void>}
**/
export function StructPointerInputErrorOutput(_in) {
export async function StructPointerInputErrorOutput(_in) {
return wails.CallByName("main.GreetService.StructPointerInputErrorOutput", ...Array.prototype.slice.call(arguments, 0));
}
@ -299,7 +299,7 @@ export function StructPointerInputErrorOutput(_in) {
* @param _in {Person | null}
* @returns {Promise<Person>}
**/
export function StructPointerInputStructPointerOutput(_in) {
export async function StructPointerInputStructPointerOutput(_in) {
return wails.CallByName("main.GreetService.StructPointerInputStructPointerOutput", ...Array.prototype.slice.call(arguments, 0));
}
@ -308,7 +308,7 @@ export function StructPointerInputStructPointerOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function UInt16InUIntOut(_in) {
export async function UInt16InUIntOut(_in) {
return wails.CallByName("main.GreetService.UInt16InUIntOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -317,7 +317,7 @@ export function UInt16InUIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function UInt16PointerInAndOutput(_in) {
export async function UInt16PointerInAndOutput(_in) {
return wails.CallByName("main.GreetService.UInt16PointerInAndOutput", ...Array.prototype.slice.call(arguments, 0));
}
@ -326,7 +326,7 @@ export function UInt16PointerInAndOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function UInt32InUIntOut(_in) {
export async function UInt32InUIntOut(_in) {
return wails.CallByName("main.GreetService.UInt32InUIntOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -335,7 +335,7 @@ export function UInt32InUIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function UInt32PointerInAndOutput(_in) {
export async function UInt32PointerInAndOutput(_in) {
return wails.CallByName("main.GreetService.UInt32PointerInAndOutput", ...Array.prototype.slice.call(arguments, 0));
}
@ -344,7 +344,7 @@ export function UInt32PointerInAndOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function UInt64InUIntOut(_in) {
export async function UInt64InUIntOut(_in) {
return wails.CallByName("main.GreetService.UInt64InUIntOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -353,7 +353,7 @@ export function UInt64InUIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function UInt64PointerInAndOutput(_in) {
export async function UInt64PointerInAndOutput(_in) {
return wails.CallByName("main.GreetService.UInt64PointerInAndOutput", ...Array.prototype.slice.call(arguments, 0));
}
@ -362,7 +362,7 @@ export function UInt64PointerInAndOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function UInt8InUIntOut(_in) {
export async function UInt8InUIntOut(_in) {
return wails.CallByName("main.GreetService.UInt8InUIntOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -371,7 +371,7 @@ export function UInt8InUIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function UInt8PointerInAndOutput(_in) {
export async function UInt8PointerInAndOutput(_in) {
return wails.CallByName("main.GreetService.UInt8PointerInAndOutput", ...Array.prototype.slice.call(arguments, 0));
}
@ -380,7 +380,7 @@ export function UInt8PointerInAndOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function UIntInUIntOut(_in) {
export async function UIntInUIntOut(_in) {
return wails.CallByName("main.GreetService.UIntInUIntOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -389,6 +389,6 @@ export function UIntInUIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function UIntPointerInAndOutput(_in) {
export async function UIntPointerInAndOutput(_in) {
return wails.CallByName("main.GreetService.UIntPointerInAndOutput", ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -0,0 +1,178 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {Person} from './models';
export async function ArrayInt(_in: number[]) : Promise<void> {
return wails.CallByName("main.GreetService.ArrayInt", _in);
}
export async function BoolInBoolOut(_in: boolean) : Promise<boolean> {
return wails.CallByName("main.GreetService.BoolInBoolOut", _in);
}
export async function Float32InFloat32Out(_in: number) : Promise<number> {
return wails.CallByName("main.GreetService.Float32InFloat32Out", _in);
}
export async function Float64InFloat64Out(_in: number) : Promise<number> {
return wails.CallByName("main.GreetService.Float64InFloat64Out", _in);
}
// Greet someone
export async function Greet(name: string) : Promise<string> {
return wails.CallByName("main.GreetService.Greet", name);
}
export async function Int16InIntOut(_in: number) : Promise<number> {
return wails.CallByName("main.GreetService.Int16InIntOut", _in);
}
export async function Int16PointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByName("main.GreetService.Int16PointerInAndOutput", _in);
}
export async function Int32InIntOut(_in: number) : Promise<number> {
return wails.CallByName("main.GreetService.Int32InIntOut", _in);
}
export async function Int32PointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByName("main.GreetService.Int32PointerInAndOutput", _in);
}
export async function Int64InIntOut(_in: number) : Promise<number> {
return wails.CallByName("main.GreetService.Int64InIntOut", _in);
}
export async function Int64PointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByName("main.GreetService.Int64PointerInAndOutput", _in);
}
export async function Int8InIntOut(_in: number) : Promise<number> {
return wails.CallByName("main.GreetService.Int8InIntOut", _in);
}
export async function Int8PointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByName("main.GreetService.Int8PointerInAndOutput", _in);
}
export async function IntInIntOut(_in: number) : Promise<number> {
return wails.CallByName("main.GreetService.IntInIntOut", _in);
}
export async function IntPointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByName("main.GreetService.IntPointerInAndOutput", _in);
}
export async function IntPointerInputNamedOutputs(_in: number | null) : Promise<number | null, void> {
return wails.CallByName("main.GreetService.IntPointerInputNamedOutputs", _in);
}
export async function MapIntInt(_in: map) : Promise<void> {
return wails.CallByName("main.GreetService.MapIntInt", _in);
}
export async function MapIntPointerInt(_in: map) : Promise<void> {
return wails.CallByName("main.GreetService.MapIntPointerInt", _in);
}
export async function MapIntSliceInt(_in: map) : Promise<void> {
return wails.CallByName("main.GreetService.MapIntSliceInt", _in);
}
export async function MapIntSliceIntInMapIntSliceIntOut(_in: map) : Promise<map> {
return wails.CallByName("main.GreetService.MapIntSliceIntInMapIntSliceIntOut", _in);
}
export async function NoInputsStringOut() : Promise<string> {
return wails.CallByName("main.GreetService.NoInputsStringOut");
}
export async function PointerBoolInBoolOut(_in: boolean | null) : Promise<boolean | null> {
return wails.CallByName("main.GreetService.PointerBoolInBoolOut", _in);
}
export async function PointerFloat32InFloat32Out(_in: number | null) : Promise<number | null> {
return wails.CallByName("main.GreetService.PointerFloat32InFloat32Out", _in);
}
export async function PointerFloat64InFloat64Out(_in: number | null) : Promise<number | null> {
return wails.CallByName("main.GreetService.PointerFloat64InFloat64Out", _in);
}
export async function PointerMapIntInt(_in: map | null) : Promise<void> {
return wails.CallByName("main.GreetService.PointerMapIntInt", _in);
}
export async function PointerStringInStringOut(_in: string | null) : Promise<string | null> {
return wails.CallByName("main.GreetService.PointerStringInStringOut", _in);
}
export async function StringArrayInputNamedOutput(_in: string[]) : Promise<string[]> {
return wails.CallByName("main.GreetService.StringArrayInputNamedOutput", _in);
}
export async function StringArrayInputNamedOutputs(_in: string[]) : Promise<string[], void> {
return wails.CallByName("main.GreetService.StringArrayInputNamedOutputs", _in);
}
export async function StringArrayInputStringArrayOut(_in: string[]) : Promise<string[]> {
return wails.CallByName("main.GreetService.StringArrayInputStringArrayOut", _in);
}
export async function StringArrayInputStringOut(_in: string[]) : Promise<string> {
return wails.CallByName("main.GreetService.StringArrayInputStringOut", _in);
}
export async function StructInputStructOutput(_in: Person) : Promise<Person> {
return wails.CallByName("main.GreetService.StructInputStructOutput", _in);
}
export async function StructPointerInputErrorOutput(_in: Person | null) : Promise<void> {
return wails.CallByName("main.GreetService.StructPointerInputErrorOutput", _in);
}
export async function StructPointerInputStructPointerOutput(_in: Person | null) : Promise<Person> {
return wails.CallByName("main.GreetService.StructPointerInputStructPointerOutput", _in);
}
export async function UInt16InUIntOut(_in: number) : Promise<number> {
return wails.CallByName("main.GreetService.UInt16InUIntOut", _in);
}
export async function UInt16PointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByName("main.GreetService.UInt16PointerInAndOutput", _in);
}
export async function UInt32InUIntOut(_in: number) : Promise<number> {
return wails.CallByName("main.GreetService.UInt32InUIntOut", _in);
}
export async function UInt32PointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByName("main.GreetService.UInt32PointerInAndOutput", _in);
}
export async function UInt64InUIntOut(_in: number) : Promise<number> {
return wails.CallByName("main.GreetService.UInt64InUIntOut", _in);
}
export async function UInt64PointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByName("main.GreetService.UInt64PointerInAndOutput", _in);
}
export async function UInt8InUIntOut(_in: number) : Promise<number> {
return wails.CallByName("main.GreetService.UInt8InUIntOut", _in);
}
export async function UInt8PointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByName("main.GreetService.UInt8PointerInAndOutput", _in);
}
export async function UIntInUIntOut(_in: number) : Promise<number> {
return wails.CallByName("main.GreetService.UIntInUIntOut", _in);
}
export async function UIntPointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByName("main.GreetService.UIntPointerInAndOutput", _in);
}

View File

@ -0,0 +1,178 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {Person} from './models';
export async function ArrayInt(_in: number[]) : Promise<void> {
return wails.CallByID(3862002418, _in);
}
export async function BoolInBoolOut(_in: boolean) : Promise<boolean> {
return wails.CallByID(2424639793, _in);
}
export async function Float32InFloat32Out(_in: number) : Promise<number> {
return wails.CallByID(3132595881, _in);
}
export async function Float64InFloat64Out(_in: number) : Promise<number> {
return wails.CallByID(2182412247, _in);
}
// Greet someone
export async function Greet(name: string) : Promise<string> {
return wails.CallByID(1411160069, name);
}
export async function Int16InIntOut(_in: number) : Promise<number> {
return wails.CallByID(3306292566, _in);
}
export async function Int16PointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByID(1754277916, _in);
}
export async function Int32InIntOut(_in: number) : Promise<number> {
return wails.CallByID(1909469092, _in);
}
export async function Int32PointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByID(4251088558, _in);
}
export async function Int64InIntOut(_in: number) : Promise<number> {
return wails.CallByID(1343888303, _in);
}
export async function Int64PointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByID(2205561041, _in);
}
export async function Int8InIntOut(_in: number) : Promise<number> {
return wails.CallByID(572240879, _in);
}
export async function Int8PointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByID(2189402897, _in);
}
export async function IntInIntOut(_in: number) : Promise<number> {
return wails.CallByID(642881729, _in);
}
export async function IntPointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByID(1066151743, _in);
}
export async function IntPointerInputNamedOutputs(_in: number | null) : Promise<number | null, void> {
return wails.CallByID(2718999663, _in);
}
export async function MapIntInt(_in: map) : Promise<void> {
return wails.CallByID(2386486356, _in);
}
export async function MapIntPointerInt(_in: map) : Promise<void> {
return wails.CallByID(550413585, _in);
}
export async function MapIntSliceInt(_in: map) : Promise<void> {
return wails.CallByID(2900172572, _in);
}
export async function MapIntSliceIntInMapIntSliceIntOut(_in: map) : Promise<map> {
return wails.CallByID(881980169, _in);
}
export async function NoInputsStringOut() : Promise<string> {
return wails.CallByID(1075577233);
}
export async function PointerBoolInBoolOut(_in: boolean | null) : Promise<boolean | null> {
return wails.CallByID(3589606958, _in);
}
export async function PointerFloat32InFloat32Out(_in: number | null) : Promise<number | null> {
return wails.CallByID(224675106, _in);
}
export async function PointerFloat64InFloat64Out(_in: number | null) : Promise<number | null> {
return wails.CallByID(2124953624, _in);
}
export async function PointerMapIntInt(_in: map | null) : Promise<void> {
return wails.CallByID(3516977899, _in);
}
export async function PointerStringInStringOut(_in: string | null) : Promise<string | null> {
return wails.CallByID(229603958, _in);
}
export async function StringArrayInputNamedOutput(_in: string[]) : Promise<string[]> {
return wails.CallByID(3678582682, _in);
}
export async function StringArrayInputNamedOutputs(_in: string[]) : Promise<string[], void> {
return wails.CallByID(319259595, _in);
}
export async function StringArrayInputStringArrayOut(_in: string[]) : Promise<string[]> {
return wails.CallByID(383995060, _in);
}
export async function StringArrayInputStringOut(_in: string[]) : Promise<string> {
return wails.CallByID(1091960237, _in);
}
export async function StructInputStructOutput(_in: Person) : Promise<Person> {
return wails.CallByID(3835643147, _in);
}
export async function StructPointerInputErrorOutput(_in: Person | null) : Promise<void> {
return wails.CallByID(2447692557, _in);
}
export async function StructPointerInputStructPointerOutput(_in: Person | null) : Promise<Person> {
return wails.CallByID(2943477349, _in);
}
export async function UInt16InUIntOut(_in: number) : Promise<number> {
return wails.CallByID(3401034892, _in);
}
export async function UInt16PointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByID(1236957573, _in);
}
export async function UInt32InUIntOut(_in: number) : Promise<number> {
return wails.CallByID(1160383782, _in);
}
export async function UInt32PointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByID(1739300671, _in);
}
export async function UInt64InUIntOut(_in: number) : Promise<number> {
return wails.CallByID(793803239, _in);
}
export async function UInt64PointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByID(1403757716, _in);
}
export async function UInt8InUIntOut(_in: number) : Promise<number> {
return wails.CallByID(2988345717, _in);
}
export async function UInt8PointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByID(518250834, _in);
}
export async function UIntInUIntOut(_in: number) : Promise<number> {
return wails.CallByID(2836661285, _in);
}
export async function UIntPointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByID(1367187362, _in);
}

View File

@ -11,7 +11,7 @@
* @param _in {number[]}
* @returns {Promise<void>}
**/
export function ArrayInt(_in) {
export async function ArrayInt(_in) {
return wails.CallByID(3862002418, ...Array.prototype.slice.call(arguments, 0));
}
@ -20,7 +20,7 @@ export function ArrayInt(_in) {
* @param _in {boolean}
* @returns {Promise<boolean>}
**/
export function BoolInBoolOut(_in) {
export async function BoolInBoolOut(_in) {
return wails.CallByID(2424639793, ...Array.prototype.slice.call(arguments, 0));
}
@ -29,7 +29,7 @@ export function BoolInBoolOut(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function Float32InFloat32Out(_in) {
export async function Float32InFloat32Out(_in) {
return wails.CallByID(3132595881, ...Array.prototype.slice.call(arguments, 0));
}
@ -38,7 +38,7 @@ export function Float32InFloat32Out(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function Float64InFloat64Out(_in) {
export async function Float64InFloat64Out(_in) {
return wails.CallByID(2182412247, ...Array.prototype.slice.call(arguments, 0));
}
@ -48,7 +48,7 @@ export function Float64InFloat64Out(_in) {
* @param name {string}
* @returns {Promise<string>}
**/
export function Greet(name) {
export async function Greet(name) {
return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0));
}
@ -57,7 +57,7 @@ export function Greet(name) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function Int16InIntOut(_in) {
export async function Int16InIntOut(_in) {
return wails.CallByID(3306292566, ...Array.prototype.slice.call(arguments, 0));
}
@ -66,7 +66,7 @@ export function Int16InIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function Int16PointerInAndOutput(_in) {
export async function Int16PointerInAndOutput(_in) {
return wails.CallByID(1754277916, ...Array.prototype.slice.call(arguments, 0));
}
@ -75,7 +75,7 @@ export function Int16PointerInAndOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function Int32InIntOut(_in) {
export async function Int32InIntOut(_in) {
return wails.CallByID(1909469092, ...Array.prototype.slice.call(arguments, 0));
}
@ -84,7 +84,7 @@ export function Int32InIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function Int32PointerInAndOutput(_in) {
export async function Int32PointerInAndOutput(_in) {
return wails.CallByID(4251088558, ...Array.prototype.slice.call(arguments, 0));
}
@ -93,7 +93,7 @@ export function Int32PointerInAndOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function Int64InIntOut(_in) {
export async function Int64InIntOut(_in) {
return wails.CallByID(1343888303, ...Array.prototype.slice.call(arguments, 0));
}
@ -102,7 +102,7 @@ export function Int64InIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function Int64PointerInAndOutput(_in) {
export async function Int64PointerInAndOutput(_in) {
return wails.CallByID(2205561041, ...Array.prototype.slice.call(arguments, 0));
}
@ -111,7 +111,7 @@ export function Int64PointerInAndOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function Int8InIntOut(_in) {
export async function Int8InIntOut(_in) {
return wails.CallByID(572240879, ...Array.prototype.slice.call(arguments, 0));
}
@ -120,7 +120,7 @@ export function Int8InIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function Int8PointerInAndOutput(_in) {
export async function Int8PointerInAndOutput(_in) {
return wails.CallByID(2189402897, ...Array.prototype.slice.call(arguments, 0));
}
@ -129,7 +129,7 @@ export function Int8PointerInAndOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function IntInIntOut(_in) {
export async function IntInIntOut(_in) {
return wails.CallByID(642881729, ...Array.prototype.slice.call(arguments, 0));
}
@ -138,7 +138,7 @@ export function IntInIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function IntPointerInAndOutput(_in) {
export async function IntPointerInAndOutput(_in) {
return wails.CallByID(1066151743, ...Array.prototype.slice.call(arguments, 0));
}
@ -147,7 +147,7 @@ export function IntPointerInAndOutput(_in) {
* @param _in {number | null}
* @returns {Promise<number | null, void>}
**/
export function IntPointerInputNamedOutputs(_in) {
export async function IntPointerInputNamedOutputs(_in) {
return wails.CallByID(2718999663, ...Array.prototype.slice.call(arguments, 0));
}
@ -156,7 +156,7 @@ export function IntPointerInputNamedOutputs(_in) {
* @param _in {map}
* @returns {Promise<void>}
**/
export function MapIntInt(_in) {
export async function MapIntInt(_in) {
return wails.CallByID(2386486356, ...Array.prototype.slice.call(arguments, 0));
}
@ -165,7 +165,7 @@ export function MapIntInt(_in) {
* @param _in {map}
* @returns {Promise<void>}
**/
export function MapIntPointerInt(_in) {
export async function MapIntPointerInt(_in) {
return wails.CallByID(550413585, ...Array.prototype.slice.call(arguments, 0));
}
@ -174,7 +174,7 @@ export function MapIntPointerInt(_in) {
* @param _in {map}
* @returns {Promise<void>}
**/
export function MapIntSliceInt(_in) {
export async function MapIntSliceInt(_in) {
return wails.CallByID(2900172572, ...Array.prototype.slice.call(arguments, 0));
}
@ -183,7 +183,7 @@ export function MapIntSliceInt(_in) {
* @param _in {map}
* @returns {Promise<map>}
**/
export function MapIntSliceIntInMapIntSliceIntOut(_in) {
export async function MapIntSliceIntInMapIntSliceIntOut(_in) {
return wails.CallByID(881980169, ...Array.prototype.slice.call(arguments, 0));
}
@ -191,7 +191,7 @@ export function MapIntSliceIntInMapIntSliceIntOut(_in) {
* @function NoInputsStringOut
* @returns {Promise<string>}
**/
export function NoInputsStringOut() {
export async function NoInputsStringOut() {
return wails.CallByID(1075577233, ...Array.prototype.slice.call(arguments, 0));
}
@ -200,7 +200,7 @@ export function NoInputsStringOut() {
* @param _in {boolean | null}
* @returns {Promise<boolean | null>}
**/
export function PointerBoolInBoolOut(_in) {
export async function PointerBoolInBoolOut(_in) {
return wails.CallByID(3589606958, ...Array.prototype.slice.call(arguments, 0));
}
@ -209,7 +209,7 @@ export function PointerBoolInBoolOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function PointerFloat32InFloat32Out(_in) {
export async function PointerFloat32InFloat32Out(_in) {
return wails.CallByID(224675106, ...Array.prototype.slice.call(arguments, 0));
}
@ -218,7 +218,7 @@ export function PointerFloat32InFloat32Out(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function PointerFloat64InFloat64Out(_in) {
export async function PointerFloat64InFloat64Out(_in) {
return wails.CallByID(2124953624, ...Array.prototype.slice.call(arguments, 0));
}
@ -227,7 +227,7 @@ export function PointerFloat64InFloat64Out(_in) {
* @param _in {map | null}
* @returns {Promise<void>}
**/
export function PointerMapIntInt(_in) {
export async function PointerMapIntInt(_in) {
return wails.CallByID(3516977899, ...Array.prototype.slice.call(arguments, 0));
}
@ -236,7 +236,7 @@ export function PointerMapIntInt(_in) {
* @param _in {string | null}
* @returns {Promise<string | null>}
**/
export function PointerStringInStringOut(_in) {
export async function PointerStringInStringOut(_in) {
return wails.CallByID(229603958, ...Array.prototype.slice.call(arguments, 0));
}
@ -245,7 +245,7 @@ export function PointerStringInStringOut(_in) {
* @param _in {string[]}
* @returns {Promise<string[]>}
**/
export function StringArrayInputNamedOutput(_in) {
export async function StringArrayInputNamedOutput(_in) {
return wails.CallByID(3678582682, ...Array.prototype.slice.call(arguments, 0));
}
@ -254,7 +254,7 @@ export function StringArrayInputNamedOutput(_in) {
* @param _in {string[]}
* @returns {Promise<string[], void>}
**/
export function StringArrayInputNamedOutputs(_in) {
export async function StringArrayInputNamedOutputs(_in) {
return wails.CallByID(319259595, ...Array.prototype.slice.call(arguments, 0));
}
@ -263,7 +263,7 @@ export function StringArrayInputNamedOutputs(_in) {
* @param _in {string[]}
* @returns {Promise<string[]>}
**/
export function StringArrayInputStringArrayOut(_in) {
export async function StringArrayInputStringArrayOut(_in) {
return wails.CallByID(383995060, ...Array.prototype.slice.call(arguments, 0));
}
@ -272,7 +272,7 @@ export function StringArrayInputStringArrayOut(_in) {
* @param _in {string[]}
* @returns {Promise<string>}
**/
export function StringArrayInputStringOut(_in) {
export async function StringArrayInputStringOut(_in) {
return wails.CallByID(1091960237, ...Array.prototype.slice.call(arguments, 0));
}
@ -281,7 +281,7 @@ export function StringArrayInputStringOut(_in) {
* @param _in {Person}
* @returns {Promise<Person>}
**/
export function StructInputStructOutput(_in) {
export async function StructInputStructOutput(_in) {
return wails.CallByID(3835643147, ...Array.prototype.slice.call(arguments, 0));
}
@ -290,7 +290,7 @@ export function StructInputStructOutput(_in) {
* @param _in {Person | null}
* @returns {Promise<void>}
**/
export function StructPointerInputErrorOutput(_in) {
export async function StructPointerInputErrorOutput(_in) {
return wails.CallByID(2447692557, ...Array.prototype.slice.call(arguments, 0));
}
@ -299,7 +299,7 @@ export function StructPointerInputErrorOutput(_in) {
* @param _in {Person | null}
* @returns {Promise<Person>}
**/
export function StructPointerInputStructPointerOutput(_in) {
export async function StructPointerInputStructPointerOutput(_in) {
return wails.CallByID(2943477349, ...Array.prototype.slice.call(arguments, 0));
}
@ -308,7 +308,7 @@ export function StructPointerInputStructPointerOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function UInt16InUIntOut(_in) {
export async function UInt16InUIntOut(_in) {
return wails.CallByID(3401034892, ...Array.prototype.slice.call(arguments, 0));
}
@ -317,7 +317,7 @@ export function UInt16InUIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function UInt16PointerInAndOutput(_in) {
export async function UInt16PointerInAndOutput(_in) {
return wails.CallByID(1236957573, ...Array.prototype.slice.call(arguments, 0));
}
@ -326,7 +326,7 @@ export function UInt16PointerInAndOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function UInt32InUIntOut(_in) {
export async function UInt32InUIntOut(_in) {
return wails.CallByID(1160383782, ...Array.prototype.slice.call(arguments, 0));
}
@ -335,7 +335,7 @@ export function UInt32InUIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function UInt32PointerInAndOutput(_in) {
export async function UInt32PointerInAndOutput(_in) {
return wails.CallByID(1739300671, ...Array.prototype.slice.call(arguments, 0));
}
@ -344,7 +344,7 @@ export function UInt32PointerInAndOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function UInt64InUIntOut(_in) {
export async function UInt64InUIntOut(_in) {
return wails.CallByID(793803239, ...Array.prototype.slice.call(arguments, 0));
}
@ -353,7 +353,7 @@ export function UInt64InUIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function UInt64PointerInAndOutput(_in) {
export async function UInt64PointerInAndOutput(_in) {
return wails.CallByID(1403757716, ...Array.prototype.slice.call(arguments, 0));
}
@ -362,7 +362,7 @@ export function UInt64PointerInAndOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function UInt8InUIntOut(_in) {
export async function UInt8InUIntOut(_in) {
return wails.CallByID(2988345717, ...Array.prototype.slice.call(arguments, 0));
}
@ -371,7 +371,7 @@ export function UInt8InUIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function UInt8PointerInAndOutput(_in) {
export async function UInt8PointerInAndOutput(_in) {
return wails.CallByID(518250834, ...Array.prototype.slice.call(arguments, 0));
}
@ -380,7 +380,7 @@ export function UInt8PointerInAndOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function UIntInUIntOut(_in) {
export async function UIntInUIntOut(_in) {
return wails.CallByID(2836661285, ...Array.prototype.slice.call(arguments, 0));
}
@ -389,6 +389,6 @@ export function UIntInUIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function UIntPointerInAndOutput(_in) {
export async function UIntPointerInAndOutput(_in) {
return wails.CallByID(1367187362, ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -11,7 +11,7 @@
* @param _in {number[]}
* @returns {Promise<void>}
**/
export function ArrayInt(_in) {
export async function ArrayInt(_in) {
return wails.CallByName("main.GreetService.ArrayInt", ...Array.prototype.slice.call(arguments, 0));
}
@ -20,7 +20,7 @@ export function ArrayInt(_in) {
* @param _in {boolean}
* @returns {Promise<boolean>}
**/
export function BoolInBoolOut(_in) {
export async function BoolInBoolOut(_in) {
return wails.CallByName("main.GreetService.BoolInBoolOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -29,7 +29,7 @@ export function BoolInBoolOut(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function Float32InFloat32Out(_in) {
export async function Float32InFloat32Out(_in) {
return wails.CallByName("main.GreetService.Float32InFloat32Out", ...Array.prototype.slice.call(arguments, 0));
}
@ -38,7 +38,7 @@ export function Float32InFloat32Out(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function Float64InFloat64Out(_in) {
export async function Float64InFloat64Out(_in) {
return wails.CallByName("main.GreetService.Float64InFloat64Out", ...Array.prototype.slice.call(arguments, 0));
}
@ -48,7 +48,7 @@ export function Float64InFloat64Out(_in) {
* @param name {string}
* @returns {Promise<string>}
**/
export function Greet(name) {
export async function Greet(name) {
return wails.CallByName("main.GreetService.Greet", ...Array.prototype.slice.call(arguments, 0));
}
@ -57,7 +57,7 @@ export function Greet(name) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function Int16InIntOut(_in) {
export async function Int16InIntOut(_in) {
return wails.CallByName("main.GreetService.Int16InIntOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -66,7 +66,7 @@ export function Int16InIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function Int16PointerInAndOutput(_in) {
export async function Int16PointerInAndOutput(_in) {
return wails.CallByName("main.GreetService.Int16PointerInAndOutput", ...Array.prototype.slice.call(arguments, 0));
}
@ -75,7 +75,7 @@ export function Int16PointerInAndOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function Int32InIntOut(_in) {
export async function Int32InIntOut(_in) {
return wails.CallByName("main.GreetService.Int32InIntOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -84,7 +84,7 @@ export function Int32InIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function Int32PointerInAndOutput(_in) {
export async function Int32PointerInAndOutput(_in) {
return wails.CallByName("main.GreetService.Int32PointerInAndOutput", ...Array.prototype.slice.call(arguments, 0));
}
@ -93,7 +93,7 @@ export function Int32PointerInAndOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function Int64InIntOut(_in) {
export async function Int64InIntOut(_in) {
return wails.CallByName("main.GreetService.Int64InIntOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -102,7 +102,7 @@ export function Int64InIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function Int64PointerInAndOutput(_in) {
export async function Int64PointerInAndOutput(_in) {
return wails.CallByName("main.GreetService.Int64PointerInAndOutput", ...Array.prototype.slice.call(arguments, 0));
}
@ -111,7 +111,7 @@ export function Int64PointerInAndOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function Int8InIntOut(_in) {
export async function Int8InIntOut(_in) {
return wails.CallByName("main.GreetService.Int8InIntOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -120,7 +120,7 @@ export function Int8InIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function Int8PointerInAndOutput(_in) {
export async function Int8PointerInAndOutput(_in) {
return wails.CallByName("main.GreetService.Int8PointerInAndOutput", ...Array.prototype.slice.call(arguments, 0));
}
@ -129,7 +129,7 @@ export function Int8PointerInAndOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function IntInIntOut(_in) {
export async function IntInIntOut(_in) {
return wails.CallByName("main.GreetService.IntInIntOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -138,7 +138,7 @@ export function IntInIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function IntPointerInAndOutput(_in) {
export async function IntPointerInAndOutput(_in) {
return wails.CallByName("main.GreetService.IntPointerInAndOutput", ...Array.prototype.slice.call(arguments, 0));
}
@ -147,7 +147,7 @@ export function IntPointerInAndOutput(_in) {
* @param _in {number | null}
* @returns {Promise<number | null, void>}
**/
export function IntPointerInputNamedOutputs(_in) {
export async function IntPointerInputNamedOutputs(_in) {
return wails.CallByName("main.GreetService.IntPointerInputNamedOutputs", ...Array.prototype.slice.call(arguments, 0));
}
@ -156,7 +156,7 @@ export function IntPointerInputNamedOutputs(_in) {
* @param _in {map}
* @returns {Promise<void>}
**/
export function MapIntInt(_in) {
export async function MapIntInt(_in) {
return wails.CallByName("main.GreetService.MapIntInt", ...Array.prototype.slice.call(arguments, 0));
}
@ -165,7 +165,7 @@ export function MapIntInt(_in) {
* @param _in {map}
* @returns {Promise<void>}
**/
export function MapIntPointerInt(_in) {
export async function MapIntPointerInt(_in) {
return wails.CallByName("main.GreetService.MapIntPointerInt", ...Array.prototype.slice.call(arguments, 0));
}
@ -174,7 +174,7 @@ export function MapIntPointerInt(_in) {
* @param _in {map}
* @returns {Promise<void>}
**/
export function MapIntSliceInt(_in) {
export async function MapIntSliceInt(_in) {
return wails.CallByName("main.GreetService.MapIntSliceInt", ...Array.prototype.slice.call(arguments, 0));
}
@ -183,7 +183,7 @@ export function MapIntSliceInt(_in) {
* @param _in {map}
* @returns {Promise<map>}
**/
export function MapIntSliceIntInMapIntSliceIntOut(_in) {
export async function MapIntSliceIntInMapIntSliceIntOut(_in) {
return wails.CallByName("main.GreetService.MapIntSliceIntInMapIntSliceIntOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -191,7 +191,7 @@ export function MapIntSliceIntInMapIntSliceIntOut(_in) {
* @function NoInputsStringOut
* @returns {Promise<string>}
**/
export function NoInputsStringOut() {
export async function NoInputsStringOut() {
return wails.CallByName("main.GreetService.NoInputsStringOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -200,7 +200,7 @@ export function NoInputsStringOut() {
* @param _in {boolean | null}
* @returns {Promise<boolean | null>}
**/
export function PointerBoolInBoolOut(_in) {
export async function PointerBoolInBoolOut(_in) {
return wails.CallByName("main.GreetService.PointerBoolInBoolOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -209,7 +209,7 @@ export function PointerBoolInBoolOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function PointerFloat32InFloat32Out(_in) {
export async function PointerFloat32InFloat32Out(_in) {
return wails.CallByName("main.GreetService.PointerFloat32InFloat32Out", ...Array.prototype.slice.call(arguments, 0));
}
@ -218,7 +218,7 @@ export function PointerFloat32InFloat32Out(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function PointerFloat64InFloat64Out(_in) {
export async function PointerFloat64InFloat64Out(_in) {
return wails.CallByName("main.GreetService.PointerFloat64InFloat64Out", ...Array.prototype.slice.call(arguments, 0));
}
@ -227,7 +227,7 @@ export function PointerFloat64InFloat64Out(_in) {
* @param _in {map | null}
* @returns {Promise<void>}
**/
export function PointerMapIntInt(_in) {
export async function PointerMapIntInt(_in) {
return wails.CallByName("main.GreetService.PointerMapIntInt", ...Array.prototype.slice.call(arguments, 0));
}
@ -236,7 +236,7 @@ export function PointerMapIntInt(_in) {
* @param _in {string | null}
* @returns {Promise<string | null>}
**/
export function PointerStringInStringOut(_in) {
export async function PointerStringInStringOut(_in) {
return wails.CallByName("main.GreetService.PointerStringInStringOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -245,7 +245,7 @@ export function PointerStringInStringOut(_in) {
* @param _in {string[]}
* @returns {Promise<string[]>}
**/
export function StringArrayInputNamedOutput(_in) {
export async function StringArrayInputNamedOutput(_in) {
return wails.CallByName("main.GreetService.StringArrayInputNamedOutput", ...Array.prototype.slice.call(arguments, 0));
}
@ -254,7 +254,7 @@ export function StringArrayInputNamedOutput(_in) {
* @param _in {string[]}
* @returns {Promise<string[], void>}
**/
export function StringArrayInputNamedOutputs(_in) {
export async function StringArrayInputNamedOutputs(_in) {
return wails.CallByName("main.GreetService.StringArrayInputNamedOutputs", ...Array.prototype.slice.call(arguments, 0));
}
@ -263,7 +263,7 @@ export function StringArrayInputNamedOutputs(_in) {
* @param _in {string[]}
* @returns {Promise<string[]>}
**/
export function StringArrayInputStringArrayOut(_in) {
export async function StringArrayInputStringArrayOut(_in) {
return wails.CallByName("main.GreetService.StringArrayInputStringArrayOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -272,7 +272,7 @@ export function StringArrayInputStringArrayOut(_in) {
* @param _in {string[]}
* @returns {Promise<string>}
**/
export function StringArrayInputStringOut(_in) {
export async function StringArrayInputStringOut(_in) {
return wails.CallByName("main.GreetService.StringArrayInputStringOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -281,7 +281,7 @@ export function StringArrayInputStringOut(_in) {
* @param _in {Person}
* @returns {Promise<Person>}
**/
export function StructInputStructOutput(_in) {
export async function StructInputStructOutput(_in) {
return wails.CallByName("main.GreetService.StructInputStructOutput", ...Array.prototype.slice.call(arguments, 0));
}
@ -290,7 +290,7 @@ export function StructInputStructOutput(_in) {
* @param _in {Person | null}
* @returns {Promise<void>}
**/
export function StructPointerInputErrorOutput(_in) {
export async function StructPointerInputErrorOutput(_in) {
return wails.CallByName("main.GreetService.StructPointerInputErrorOutput", ...Array.prototype.slice.call(arguments, 0));
}
@ -299,7 +299,7 @@ export function StructPointerInputErrorOutput(_in) {
* @param _in {Person | null}
* @returns {Promise<Person>}
**/
export function StructPointerInputStructPointerOutput(_in) {
export async function StructPointerInputStructPointerOutput(_in) {
return wails.CallByName("main.GreetService.StructPointerInputStructPointerOutput", ...Array.prototype.slice.call(arguments, 0));
}
@ -308,7 +308,7 @@ export function StructPointerInputStructPointerOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function UInt16InUIntOut(_in) {
export async function UInt16InUIntOut(_in) {
return wails.CallByName("main.GreetService.UInt16InUIntOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -317,7 +317,7 @@ export function UInt16InUIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function UInt16PointerInAndOutput(_in) {
export async function UInt16PointerInAndOutput(_in) {
return wails.CallByName("main.GreetService.UInt16PointerInAndOutput", ...Array.prototype.slice.call(arguments, 0));
}
@ -326,7 +326,7 @@ export function UInt16PointerInAndOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function UInt32InUIntOut(_in) {
export async function UInt32InUIntOut(_in) {
return wails.CallByName("main.GreetService.UInt32InUIntOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -335,7 +335,7 @@ export function UInt32InUIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function UInt32PointerInAndOutput(_in) {
export async function UInt32PointerInAndOutput(_in) {
return wails.CallByName("main.GreetService.UInt32PointerInAndOutput", ...Array.prototype.slice.call(arguments, 0));
}
@ -344,7 +344,7 @@ export function UInt32PointerInAndOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function UInt64InUIntOut(_in) {
export async function UInt64InUIntOut(_in) {
return wails.CallByName("main.GreetService.UInt64InUIntOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -353,7 +353,7 @@ export function UInt64InUIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function UInt64PointerInAndOutput(_in) {
export async function UInt64PointerInAndOutput(_in) {
return wails.CallByName("main.GreetService.UInt64PointerInAndOutput", ...Array.prototype.slice.call(arguments, 0));
}
@ -362,7 +362,7 @@ export function UInt64PointerInAndOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function UInt8InUIntOut(_in) {
export async function UInt8InUIntOut(_in) {
return wails.CallByName("main.GreetService.UInt8InUIntOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -371,7 +371,7 @@ export function UInt8InUIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function UInt8PointerInAndOutput(_in) {
export async function UInt8PointerInAndOutput(_in) {
return wails.CallByName("main.GreetService.UInt8PointerInAndOutput", ...Array.prototype.slice.call(arguments, 0));
}
@ -380,7 +380,7 @@ export function UInt8PointerInAndOutput(_in) {
* @param _in {number}
* @returns {Promise<number>}
**/
export function UIntInUIntOut(_in) {
export async function UIntInUIntOut(_in) {
return wails.CallByName("main.GreetService.UIntInUIntOut", ...Array.prototype.slice.call(arguments, 0));
}
@ -389,6 +389,6 @@ export function UIntInUIntOut(_in) {
* @param _in {number | null}
* @returns {Promise<number | null>}
**/
export function UIntPointerInAndOutput(_in) {
export async function UIntPointerInAndOutput(_in) {
return wails.CallByName("main.GreetService.UIntPointerInAndOutput", ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -0,0 +1,178 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {Person} from './models';
export async function ArrayInt(_in: number[]) : Promise<void> {
return wails.CallByName("main.GreetService.ArrayInt", _in);
}
export async function BoolInBoolOut(_in: boolean) : Promise<boolean> {
return wails.CallByName("main.GreetService.BoolInBoolOut", _in);
}
export async function Float32InFloat32Out(_in: number) : Promise<number> {
return wails.CallByName("main.GreetService.Float32InFloat32Out", _in);
}
export async function Float64InFloat64Out(_in: number) : Promise<number> {
return wails.CallByName("main.GreetService.Float64InFloat64Out", _in);
}
// Greet someone
export async function Greet(name: string) : Promise<string> {
return wails.CallByName("main.GreetService.Greet", name);
}
export async function Int16InIntOut(_in: number) : Promise<number> {
return wails.CallByName("main.GreetService.Int16InIntOut", _in);
}
export async function Int16PointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByName("main.GreetService.Int16PointerInAndOutput", _in);
}
export async function Int32InIntOut(_in: number) : Promise<number> {
return wails.CallByName("main.GreetService.Int32InIntOut", _in);
}
export async function Int32PointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByName("main.GreetService.Int32PointerInAndOutput", _in);
}
export async function Int64InIntOut(_in: number) : Promise<number> {
return wails.CallByName("main.GreetService.Int64InIntOut", _in);
}
export async function Int64PointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByName("main.GreetService.Int64PointerInAndOutput", _in);
}
export async function Int8InIntOut(_in: number) : Promise<number> {
return wails.CallByName("main.GreetService.Int8InIntOut", _in);
}
export async function Int8PointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByName("main.GreetService.Int8PointerInAndOutput", _in);
}
export async function IntInIntOut(_in: number) : Promise<number> {
return wails.CallByName("main.GreetService.IntInIntOut", _in);
}
export async function IntPointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByName("main.GreetService.IntPointerInAndOutput", _in);
}
export async function IntPointerInputNamedOutputs(_in: number | null) : Promise<number | null, void> {
return wails.CallByName("main.GreetService.IntPointerInputNamedOutputs", _in);
}
export async function MapIntInt(_in: map) : Promise<void> {
return wails.CallByName("main.GreetService.MapIntInt", _in);
}
export async function MapIntPointerInt(_in: map) : Promise<void> {
return wails.CallByName("main.GreetService.MapIntPointerInt", _in);
}
export async function MapIntSliceInt(_in: map) : Promise<void> {
return wails.CallByName("main.GreetService.MapIntSliceInt", _in);
}
export async function MapIntSliceIntInMapIntSliceIntOut(_in: map) : Promise<map> {
return wails.CallByName("main.GreetService.MapIntSliceIntInMapIntSliceIntOut", _in);
}
export async function NoInputsStringOut() : Promise<string> {
return wails.CallByName("main.GreetService.NoInputsStringOut");
}
export async function PointerBoolInBoolOut(_in: boolean | null) : Promise<boolean | null> {
return wails.CallByName("main.GreetService.PointerBoolInBoolOut", _in);
}
export async function PointerFloat32InFloat32Out(_in: number | null) : Promise<number | null> {
return wails.CallByName("main.GreetService.PointerFloat32InFloat32Out", _in);
}
export async function PointerFloat64InFloat64Out(_in: number | null) : Promise<number | null> {
return wails.CallByName("main.GreetService.PointerFloat64InFloat64Out", _in);
}
export async function PointerMapIntInt(_in: map | null) : Promise<void> {
return wails.CallByName("main.GreetService.PointerMapIntInt", _in);
}
export async function PointerStringInStringOut(_in: string | null) : Promise<string | null> {
return wails.CallByName("main.GreetService.PointerStringInStringOut", _in);
}
export async function StringArrayInputNamedOutput(_in: string[]) : Promise<string[]> {
return wails.CallByName("main.GreetService.StringArrayInputNamedOutput", _in);
}
export async function StringArrayInputNamedOutputs(_in: string[]) : Promise<string[], void> {
return wails.CallByName("main.GreetService.StringArrayInputNamedOutputs", _in);
}
export async function StringArrayInputStringArrayOut(_in: string[]) : Promise<string[]> {
return wails.CallByName("main.GreetService.StringArrayInputStringArrayOut", _in);
}
export async function StringArrayInputStringOut(_in: string[]) : Promise<string> {
return wails.CallByName("main.GreetService.StringArrayInputStringOut", _in);
}
export async function StructInputStructOutput(_in: Person) : Promise<Person> {
return wails.CallByName("main.GreetService.StructInputStructOutput", _in);
}
export async function StructPointerInputErrorOutput(_in: Person | null) : Promise<void> {
return wails.CallByName("main.GreetService.StructPointerInputErrorOutput", _in);
}
export async function StructPointerInputStructPointerOutput(_in: Person | null) : Promise<Person> {
return wails.CallByName("main.GreetService.StructPointerInputStructPointerOutput", _in);
}
export async function UInt16InUIntOut(_in: number) : Promise<number> {
return wails.CallByName("main.GreetService.UInt16InUIntOut", _in);
}
export async function UInt16PointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByName("main.GreetService.UInt16PointerInAndOutput", _in);
}
export async function UInt32InUIntOut(_in: number) : Promise<number> {
return wails.CallByName("main.GreetService.UInt32InUIntOut", _in);
}
export async function UInt32PointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByName("main.GreetService.UInt32PointerInAndOutput", _in);
}
export async function UInt64InUIntOut(_in: number) : Promise<number> {
return wails.CallByName("main.GreetService.UInt64InUIntOut", _in);
}
export async function UInt64PointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByName("main.GreetService.UInt64PointerInAndOutput", _in);
}
export async function UInt8InUIntOut(_in: number) : Promise<number> {
return wails.CallByName("main.GreetService.UInt8InUIntOut", _in);
}
export async function UInt8PointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByName("main.GreetService.UInt8PointerInAndOutput", _in);
}
export async function UIntInUIntOut(_in: number) : Promise<number> {
return wails.CallByName("main.GreetService.UIntInUIntOut", _in);
}
export async function UIntPointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByName("main.GreetService.UIntPointerInAndOutput", _in);
}

View File

@ -0,0 +1,178 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {Person} from './models';
export async function ArrayInt(_in: number[]) : Promise<void> {
return wails.CallByID(3862002418, _in);
}
export async function BoolInBoolOut(_in: boolean) : Promise<boolean> {
return wails.CallByID(2424639793, _in);
}
export async function Float32InFloat32Out(_in: number) : Promise<number> {
return wails.CallByID(3132595881, _in);
}
export async function Float64InFloat64Out(_in: number) : Promise<number> {
return wails.CallByID(2182412247, _in);
}
// Greet someone
export async function Greet(name: string) : Promise<string> {
return wails.CallByID(1411160069, name);
}
export async function Int16InIntOut(_in: number) : Promise<number> {
return wails.CallByID(3306292566, _in);
}
export async function Int16PointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByID(1754277916, _in);
}
export async function Int32InIntOut(_in: number) : Promise<number> {
return wails.CallByID(1909469092, _in);
}
export async function Int32PointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByID(4251088558, _in);
}
export async function Int64InIntOut(_in: number) : Promise<number> {
return wails.CallByID(1343888303, _in);
}
export async function Int64PointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByID(2205561041, _in);
}
export async function Int8InIntOut(_in: number) : Promise<number> {
return wails.CallByID(572240879, _in);
}
export async function Int8PointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByID(2189402897, _in);
}
export async function IntInIntOut(_in: number) : Promise<number> {
return wails.CallByID(642881729, _in);
}
export async function IntPointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByID(1066151743, _in);
}
export async function IntPointerInputNamedOutputs(_in: number | null) : Promise<number | null, void> {
return wails.CallByID(2718999663, _in);
}
export async function MapIntInt(_in: map) : Promise<void> {
return wails.CallByID(2386486356, _in);
}
export async function MapIntPointerInt(_in: map) : Promise<void> {
return wails.CallByID(550413585, _in);
}
export async function MapIntSliceInt(_in: map) : Promise<void> {
return wails.CallByID(2900172572, _in);
}
export async function MapIntSliceIntInMapIntSliceIntOut(_in: map) : Promise<map> {
return wails.CallByID(881980169, _in);
}
export async function NoInputsStringOut() : Promise<string> {
return wails.CallByID(1075577233);
}
export async function PointerBoolInBoolOut(_in: boolean | null) : Promise<boolean | null> {
return wails.CallByID(3589606958, _in);
}
export async function PointerFloat32InFloat32Out(_in: number | null) : Promise<number | null> {
return wails.CallByID(224675106, _in);
}
export async function PointerFloat64InFloat64Out(_in: number | null) : Promise<number | null> {
return wails.CallByID(2124953624, _in);
}
export async function PointerMapIntInt(_in: map | null) : Promise<void> {
return wails.CallByID(3516977899, _in);
}
export async function PointerStringInStringOut(_in: string | null) : Promise<string | null> {
return wails.CallByID(229603958, _in);
}
export async function StringArrayInputNamedOutput(_in: string[]) : Promise<string[]> {
return wails.CallByID(3678582682, _in);
}
export async function StringArrayInputNamedOutputs(_in: string[]) : Promise<string[], void> {
return wails.CallByID(319259595, _in);
}
export async function StringArrayInputStringArrayOut(_in: string[]) : Promise<string[]> {
return wails.CallByID(383995060, _in);
}
export async function StringArrayInputStringOut(_in: string[]) : Promise<string> {
return wails.CallByID(1091960237, _in);
}
export async function StructInputStructOutput(_in: Person) : Promise<Person> {
return wails.CallByID(3835643147, _in);
}
export async function StructPointerInputErrorOutput(_in: Person | null) : Promise<void> {
return wails.CallByID(2447692557, _in);
}
export async function StructPointerInputStructPointerOutput(_in: Person | null) : Promise<Person> {
return wails.CallByID(2943477349, _in);
}
export async function UInt16InUIntOut(_in: number) : Promise<number> {
return wails.CallByID(3401034892, _in);
}
export async function UInt16PointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByID(1236957573, _in);
}
export async function UInt32InUIntOut(_in: number) : Promise<number> {
return wails.CallByID(1160383782, _in);
}
export async function UInt32PointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByID(1739300671, _in);
}
export async function UInt64InUIntOut(_in: number) : Promise<number> {
return wails.CallByID(793803239, _in);
}
export async function UInt64PointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByID(1403757716, _in);
}
export async function UInt8InUIntOut(_in: number) : Promise<number> {
return wails.CallByID(2988345717, _in);
}
export async function UInt8PointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByID(518250834, _in);
}
export async function UIntInUIntOut(_in: number) : Promise<number> {
return wails.CallByID(2836661285, _in);
}
export async function UIntPointerInAndOutput(_in: number | null) : Promise<number | null> {
return wails.CallByID(1367187362, _in);
}

View File

@ -9,6 +9,6 @@
* @param name {string}
* @returns {Promise<string>}
**/
export function Greet(name) {
export async function Greet(name) {
return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -9,6 +9,6 @@
* @param name {string}
* @returns {Promise<string>}
**/
export function Greet(name) {
export async function Greet(name) {
return wails.CallByName("main.GreetService.Greet", ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -0,0 +1,8 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
// Greet someone
export async function Greet(name: string) : Promise<string> {
return wails.CallByName("main.GreetService.Greet", name);
}

View File

@ -0,0 +1,8 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
// Greet someone
export async function Greet(name: string) : Promise<string> {
return wails.CallByID(1411160069, name);
}

View File

@ -9,6 +9,6 @@
* @param name {string}
* @returns {Promise<string>}
**/
export function Greet(name) {
export async function Greet(name) {
return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -9,6 +9,6 @@
* @param name {string}
* @returns {Promise<string>}
**/
export function Greet(name) {
export async function Greet(name) {
return wails.CallByName("main.GreetService.Greet", ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -0,0 +1,8 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
// Greet someone
export async function Greet(name: string) : Promise<string> {
return wails.CallByName("main.GreetService.Greet", name);
}

View File

@ -0,0 +1,8 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
// Greet someone
export async function Greet(name: string) : Promise<string> {
return wails.CallByID(1411160069, name);
}

View File

@ -12,7 +12,7 @@
* @param name {string}
* @returns {Promise<string>}
**/
export function Greet(name) {
export async function Greet(name) {
return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0));
}
@ -22,6 +22,6 @@ export function Greet(name) {
* @param name {string}
* @returns {Promise<Person>}
**/
export function NewPerson(name) {
export async function NewPerson(name) {
return wails.CallByID(1661412647, ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -12,7 +12,7 @@
* @param name {string}
* @returns {Promise<string>}
**/
export function Greet(name) {
export async function Greet(name) {
return wails.CallByName("main.GreetService.Greet", ...Array.prototype.slice.call(arguments, 0));
}
@ -22,6 +22,6 @@ export function Greet(name) {
* @param name {string}
* @returns {Promise<Person>}
**/
export function NewPerson(name) {
export async function NewPerson(name) {
return wails.CallByName("main.GreetService.NewPerson", ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -0,0 +1,15 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {Person} from './models';
// Greet does XYZ
export async function Greet(name: string) : Promise<string> {
return wails.CallByName("main.GreetService.Greet", name);
}
// NewPerson creates a new person
export async function NewPerson(name: string) : Promise<Person> {
return wails.CallByName("main.GreetService.NewPerson", name);
}

View File

@ -0,0 +1,15 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {Person} from './models';
// Greet does XYZ
export async function Greet(name: string) : Promise<string> {
return wails.CallByID(1411160069, name);
}
// NewPerson creates a new person
export async function NewPerson(name: string) : Promise<Person> {
return wails.CallByID(1661412647, name);
}

View File

@ -11,6 +11,6 @@
* @function Yay
* @returns {Promise<Address>}
**/
export function Yay() {
export async function Yay() {
return wails.CallByID(302702907, ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -11,6 +11,6 @@
* @function Yay
* @returns {Promise<Address>}
**/
export function Yay() {
export async function Yay() {
return wails.CallByName("services.OtherService.Yay", ...Array.prototype.slice.call(arguments, 0));
}

View File

@ -0,0 +1,10 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {Address} from './models';
// Yay does this and that
export async function Yay() : Promise<Address> {
return wails.CallByName("services.OtherService.Yay");
}

View File

@ -0,0 +1,10 @@
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {Address} from './models';
// Yay does this and that
export async function Yay() : Promise<Address> {
return wails.CallByID(302702907);
}