From 45b2681dfca05b6918ed04a67f36276d1f433cc6 Mon Sep 17 00:00:00 2001 From: Fabio Massaioli Date: Fri, 22 Mar 2024 11:18:04 +0100 Subject: [PATCH] [v3] Fix binding generator output and import paths (#3334) * Fix relative import path computation * Fix models output path * Add option to generate bindings using bundled runtime * Update binding example * Fix testdata * Update changelog --------- Co-authored-by: Lea Anthony --- mkdocs-website/docs/en/changelog.md | 3 + v3/examples/binding/GreetService.go | 8 +- v3/examples/binding/README.md | 2 +- .../binding/assets/bindings/data/models.js | 28 ++++++ .../assets/bindings/main/GreetService.js | 28 ++++++ v3/examples/binding/assets/bindings_main.js | 26 ------ v3/examples/binding/assets/index.html | 19 ++-- v3/examples/binding/assets/main.js | 27 ------ v3/examples/binding/assets/models.ts | 23 ----- v3/examples/binding/data/person.go | 7 ++ v3/examples/binding/models.ts | 24 ------ v3/internal/flags/bindings.go | 19 ++-- v3/internal/parser/bindings.go | 14 +-- v3/internal/parser/bindings_test.go | 2 +- v3/internal/parser/models.go | 5 +- v3/internal/parser/parser.go | 61 +++++++++---- .../frontend/bindings/main/GreetService.js | 4 +- .../bindings/main/GreetService.name.js | 4 +- .../frontend/bindings/main/GreetService.js | 2 +- .../bindings/main/GreetService.name.js | 2 +- .../frontend/bindings/main/GreetService.js | 4 +- .../bindings/main/GreetService.name.js | 4 +- .../bindings/services/OtherService.js | 2 +- .../bindings/services/OtherService.name.js | 2 +- .../frontend/bindings/main/GreetService.js | 4 +- .../bindings/main/GreetService.name.js | 4 +- .../bindings/services/other/OtherService.js | 2 +- .../services/other/OtherService.name.js | 2 +- .../frontend/bindings/main/GreetService.js | 2 +- .../bindings/main/GreetService.name.js | 2 +- .../frontend/bindings/main/GreetService.js | 4 +- .../bindings/main/GreetService.name.js | 4 +- .../frontend/bindings/main/GreetService.js | 2 +- .../bindings/main/GreetService.name.js | 2 +- .../frontend/bindings/main/OtherService.js | 2 +- .../bindings/main/OtherService.name.js | 2 +- .../frontend/bindings/main/GreetService.js | 2 +- .../bindings/main/GreetService.name.js | 2 +- .../frontend/bindings/main/OtherService.js | 2 +- .../bindings/main/OtherService.name.js | 2 +- .../frontend/bindings/main/GreetService.js | 4 +- .../bindings/main/GreetService.name.js | 4 +- .../bindings/services/OtherService.js | 2 +- .../bindings/services/OtherService.name.js | 2 +- .../frontend/bindings/main/GreetService.js | 86 +++++++++---------- .../bindings/main/GreetService.name.js | 86 +++++++++---------- .../frontend/bindings/main/GreetService.js | 86 +++++++++---------- .../bindings/main/GreetService.name.js | 86 +++++++++---------- .../frontend/bindings/main/GreetService.js | 2 +- .../bindings/main/GreetService.name.js | 2 +- .../frontend/bindings/main/GreetService.js | 2 +- .../bindings/main/GreetService.name.js | 2 +- .../frontend/bindings/main/GreetService.js | 4 +- .../bindings/main/GreetService.name.js | 4 +- .../bindings/services/OtherService.js | 2 +- .../bindings/services/OtherService.name.js | 2 +- 56 files changed, 364 insertions(+), 372 deletions(-) create mode 100644 v3/examples/binding/assets/bindings/data/models.js create mode 100644 v3/examples/binding/assets/bindings/main/GreetService.js delete mode 100644 v3/examples/binding/assets/bindings_main.js delete mode 100644 v3/examples/binding/assets/main.js delete mode 100644 v3/examples/binding/assets/models.ts create mode 100644 v3/examples/binding/data/person.go delete mode 100644 v3/examples/binding/models.ts diff --git a/mkdocs-website/docs/en/changelog.md b/mkdocs-website/docs/en/changelog.md index 07a30e126c1..1606420e575 100644 --- a/mkdocs-website/docs/en/changelog.md +++ b/mkdocs-website/docs/en/changelog.md @@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Expose the `WebviewWindow.IsFocused` method on the `Window` interface by [@fbbdev](https://github.com/fbbdev) in [#3295](https://github.com/wailsapp/wails/pull/3295) - Support multiple space-separated trigger events in the WML system by [@fbbdev](https://github.com/fbbdev) in [#3295](https://github.com/wailsapp/wails/pull/3295) - Add ESM exports from the bundled JS runtime script by [@fbbdev](https://github.com/fbbdev) in [#3295](https://github.com/wailsapp/wails/pull/3295) +- Add binding generator flag for using the bundled JS runtime script instead of the npm package by [@fbbdev](https://github.com/fbbdev) in [#3334](https://github.com/wailsapp/wails/pull/3334) ### Fixed @@ -51,6 +52,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Correctly compute `startURL` across multiple `GetStartURL` invocations when `FRONTEND_DEVSERVER_URL` is present. [#3299](https://github.com/wailsapp/wails/pull/3299) - Fix the JS type of the `Screen` struct to match its Go counterpart by [@fbbdev](https://github.com/fbbdev) in [#3295](https://github.com/wailsapp/wails/pull/3295) - Fix the `WML.Reload` method to ensure proper cleanup of registered event listeners by [@fbbdev](https://github.com/fbbdev) in [#3295](https://github.com/wailsapp/wails/pull/3295) +- Fix the output path and extension of model files produced by the binding generator by [@fbbdev](https://github.com/fbbdev) in [#3334](https://github.com/wailsapp/wails/pull/3334) +- Fix the import paths of model files in JS code produced by the binding generator by [@fbbdev](https://github.com/fbbdev) in [#3334](https://github.com/wailsapp/wails/pull/3334) ### Changed diff --git a/v3/examples/binding/GreetService.go b/v3/examples/binding/GreetService.go index 2f09cea9b40..5913c3e525f 100644 --- a/v3/examples/binding/GreetService.go +++ b/v3/examples/binding/GreetService.go @@ -1,8 +1,6 @@ package main -type Person struct { - name string -} +import "github.com/wailsapp/wails/v3/examples/binding/data" // GreetService is a service that greets people type GreetService struct { @@ -14,6 +12,6 @@ func (*GreetService) Greet(name string) string { } // GreetPerson greets a person -func (*GreetService) GreetPerson(person Person) string { - return "Hello " + person.name +func (*GreetService) GreetPerson(person data.Person) string { + return "Hello " + person.Name } diff --git a/v3/examples/binding/README.md b/v3/examples/binding/README.md index 7f07a896fc2..9b5d68a7a43 100644 --- a/v3/examples/binding/README.md +++ b/v3/examples/binding/README.md @@ -2,7 +2,7 @@ This example demonstrates how to generate bindings for your application. -To generate bindings, run `wails3 generate bindings -d assets` in this directory. +To generate bindings, run `wails3 generate bindings -b -d assets/bindings` in this directory. See more options by running `wails3 generate bindings --help`. diff --git a/v3/examples/binding/assets/bindings/data/models.js b/v3/examples/binding/assets/bindings/data/models.js new file mode 100644 index 00000000000..0820a3947a3 --- /dev/null +++ b/v3/examples/binding/assets/bindings/data/models.js @@ -0,0 +1,28 @@ +// @ts-check +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +// Person holds someone's most important attributes +export const Person = class { + /** + * Creates a new Person instance. + * @constructor + * @param {Object} source - The source object to create the Person. + * @param {string} source.Name + */ + constructor(source = {}) { + const { name = "" } = source; + this.name = name; + } + + /** + * Creates a new Person instance from a string or object. + * @param {string|object} source - The source data to create a Person instance from. + * @returns {Person} A new Person instance. + */ + static createFrom(source) { + let parsedSource = typeof source === 'string' ? JSON.parse(source) : source; + return new Person(parsedSource); + } +}; + diff --git a/v3/examples/binding/assets/bindings/main/GreetService.js b/v3/examples/binding/assets/bindings/main/GreetService.js new file mode 100644 index 00000000000..468aca7c852 --- /dev/null +++ b/v3/examples/binding/assets/bindings/main/GreetService.js @@ -0,0 +1,28 @@ +// @ts-check +// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL +// This file is automatically generated. DO NOT EDIT + +import {Call} from '/wails/runtime.js'; +/** + * @typedef {import('../data/models').Person} dataPerson + */ + +/** + * Greet greets a person + * @function Greet + * @param name {string} + * @returns {Promise} + **/ +export async function Greet(name) { + return Call.ByName("main.GreetService.Greet", ...Array.prototype.slice.call(arguments, 0)); +} + +/** + * GreetPerson greets a person + * @function GreetPerson + * @param person {dataPerson} + * @returns {Promise} + **/ +export async function GreetPerson(person) { + return Call.ByName("main.GreetService.GreetPerson", ...Array.prototype.slice.call(arguments, 0)); +} diff --git a/v3/examples/binding/assets/bindings_main.js b/v3/examples/binding/assets/bindings_main.js deleted file mode 100644 index 5636aa15466..00000000000 --- a/v3/examples/binding/assets/bindings_main.js +++ /dev/null @@ -1,26 +0,0 @@ -// @ts-check -// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL -// This file is automatically generated. DO NOT EDIT - - -window.go = window.go || {}; -window.go.main = { - GreetService: { - - /** - * GreetService.Greet - * Greet greets a person - * @param name {string} - * @returns {Promise} - **/ - Greet: function(name) { return wails.Call.ByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); }, - - /** - * GreetService.GreetPerson - * GreetPerson greets a person - * @param person {main.Person} - * @returns {Promise} - **/ - GreetPerson: function(person) { return wails.Call.ByID(4021313248, ...Array.prototype.slice.call(arguments, 0)); }, - }, -}; diff --git a/v3/examples/binding/assets/index.html b/v3/examples/binding/assets/index.html index 7d109b0d30d..53699e37f32 100644 --- a/v3/examples/binding/assets/index.html +++ b/v3/examples/binding/assets/index.html @@ -78,18 +78,17 @@
Please enter your name below 👇
- +
- - - diff --git a/v3/examples/binding/assets/main.js b/v3/examples/binding/assets/main.js deleted file mode 100644 index 81542712f13..00000000000 --- a/v3/examples/binding/assets/main.js +++ /dev/null @@ -1,27 +0,0 @@ -// @ts-check -// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL -// This file is automatically generated. DO NOT EDIT - -/** - * @typedef {import('./models').main.Person} mainPerson - */ - -export const GreetService = { - - /** - * GreetService.Greet - * Greet greets a person - * @param name {string} - * @returns {Promise} - **/ - Greet: function(name) { return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); }, - - /** - * GreetService.GreetPerson - * GreetPerson greets a person - * @param person {mainPerson} - * @returns {Promise} - **/ - GreetPerson: function(person) { return wails.CallByID(4021313248, ...Array.prototype.slice.call(arguments, 0)); }, -}; - diff --git a/v3/examples/binding/assets/models.ts b/v3/examples/binding/assets/models.ts deleted file mode 100644 index f8924363a45..00000000000 --- a/v3/examples/binding/assets/models.ts +++ /dev/null @@ -1,23 +0,0 @@ -// @ts-check -// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL -// This file is automatically generated. DO NOT EDIT - -export namespace main { - - - export class Person { - name: string; // Warning: this is unexported in the Go struct. - - constructor(source: Partial = {}) { - const { name = "" } = source; - this.name = name; - } - - static createFrom(source: string | object = {}): Person { - let parsedSource = typeof source === 'string' ? JSON.parse(source) : source; - return new Person(parsedSource as Partial); - } - - } - -} \ No newline at end of file diff --git a/v3/examples/binding/data/person.go b/v3/examples/binding/data/person.go new file mode 100644 index 00000000000..b57dd5c1e55 --- /dev/null +++ b/v3/examples/binding/data/person.go @@ -0,0 +1,7 @@ +package data + +// Person holds someone's most important attributes +type Person struct { + // Name is the person's name + Name string `json:"name"` +} diff --git a/v3/examples/binding/models.ts b/v3/examples/binding/models.ts deleted file mode 100644 index 01cb6495942..00000000000 --- a/v3/examples/binding/models.ts +++ /dev/null @@ -1,24 +0,0 @@ -// @ts-check -// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL -// This file is automatically generated. DO NOT EDIT - -export namespace main { - - export class Person { - name: string; // Warning: this is unexported in the Go struct. - - static createFrom(source: any = {}) { - return new Person(source); - } - - constructor(source: any = {}) { - if ('string' === typeof source) { - source = JSON.parse(source); - } - - this.name = source['name']; - - } - } - -} diff --git a/v3/internal/flags/bindings.go b/v3/internal/flags/bindings.go index 9bb570e7280..fbc100ee6aa 100644 --- a/v3/internal/flags/bindings.go +++ b/v3/internal/flags/bindings.go @@ -1,13 +1,14 @@ package flags type GenerateBindingsOptions struct { - Silent bool `name:"silent" description:"Silent mode"` - ModelsFilename string `name:"m" description:"The filename for the models file" default:"models.ts"` - TS bool `name:"ts" description:"Generate Typescript bindings"` - TSPrefix string `description:"The prefix for the typescript names" default:""` - TSSuffix string `description:"The postfix for the typescript names" default:""` - UseInterfaces bool `name:"i" description:"Use interfaces instead of classes"` - ProjectDirectory string `name:"p" description:"The project directory" default:"."` - UseIDs bool `name:"ids" description:"Use IDs instead of names in the binding calls"` - OutputDirectory string `name:"d" description:"The output directory" default:"frontend/bindings"` + Silent bool `name:"silent" description:"Silent mode"` + ModelsFilename string `name:"m" description:"The filename for the models file, excluding the extension" default:"models"` + TS bool `name:"ts" description:"Generate Typescript bindings"` + TSPrefix string `description:"The prefix for the typescript names" default:""` + TSSuffix string `description:"The postfix for the typescript names" default:""` + UseInterfaces bool `name:"i" description:"Use interfaces instead of classes"` + UseBundledRuntime bool `name:"b" description:"Use the bundled runtime instead of importing the npm package"` + ProjectDirectory string `name:"p" description:"The project directory" default:"."` + UseIDs bool `name:"ids" description:"Use IDs instead of names in the binding calls"` + OutputDirectory string `name:"d" description:"The output directory" default:"frontend/bindings"` } diff --git a/v3/internal/parser/bindings.go b/v3/internal/parser/bindings.go index 5555681b083..2296ca8b2af 100644 --- a/v3/internal/parser/bindings.go +++ b/v3/internal/parser/bindings.go @@ -20,7 +20,7 @@ const headerTypescript = `// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â M ` const bindingTemplate = ` -/**Comments +/**Comments * @function {{methodName}}* @param names {string} * @returns {Promise} **/ @@ -345,7 +345,7 @@ func isContext(input *Parameter) bool { return input.Type.Package == "context" && input.Type.Name == "Context" } -func (p *Project) GenerateBindings(bindings map[string]map[string][]*BoundMethod, useIDs bool, useTypescript bool) map[string]map[string]string { +func (p *Project) GenerateBindings(bindings map[string]map[string][]*BoundMethod, modelsFilename string, useIDs bool, useTypescript bool, useBundledRuntime bool) map[string]map[string]string { var result = make(map[string]map[string]string) @@ -374,7 +374,11 @@ func (p *Project) GenerateBindings(bindings map[string]map[string][]*BoundMethod var models []string var mainImports = "" if len(methods) > 0 { - mainImports = "import {Call} from '@wailsio/runtime';\n" + if useBundledRuntime { + mainImports = "import {Call} from '/wails/runtime.js';\n" + } else { + mainImports = "import {Call} from '@wailsio/runtime';\n" + } } for _, method := range methods { if useTypescript { @@ -405,7 +409,7 @@ func (p *Project) GenerateBindings(bindings map[string]map[string][]*BoundMethod sort.Strings(namespacedStructNames) for _, thisStructName := range namespacedStructNames { structInfo := namespacedStruct[thisStructName] - typedefs += " * @typedef {import('" + relativePackageDir + "/models')." + thisStructName + "} " + namePrefix + structInfo.Name + "\n" + typedefs += " * @typedef {import('" + relativePackageDir + "/" + modelsFilename + "')." + thisStructName + "} " + namePrefix + structInfo.Name + "\n" } } typedefs += " */\n" @@ -429,7 +433,7 @@ func (p *Project) GenerateBindings(bindings map[string]map[string][]*BoundMethod if namePrefix != "" { imports += "import {" + thisStructName + " as " + namePrefix + structInfo.Name + "} from '" + relativePackageDir + "/models';\n" } else { - imports += "import {" + thisStructName + "} from '" + relativePackageDir + "/models';\n" + imports += "import {" + thisStructName + "} from '" + relativePackageDir + "/" + modelsFilename + "';\n" } } } diff --git a/v3/internal/parser/bindings_test.go b/v3/internal/parser/bindings_test.go index 7907ae36f41..722a6c21890 100644 --- a/v3/internal/parser/bindings_test.go +++ b/v3/internal/parser/bindings_test.go @@ -684,7 +684,7 @@ func TestGenerateBindings(t *testing.T) { project.outputDirectory = "frontend/bindings" // Generate Bindings - got := project.GenerateBindings(project.BoundMethods, tt.useIDs, tt.useTypescript) + got := project.GenerateBindings(project.BoundMethods, "models", tt.useIDs, tt.useTypescript, false) for dirName, structDetails := range got { // iterate the struct names in structDetails diff --git a/v3/internal/parser/models.go b/v3/internal/parser/models.go index 491f4acb9c8..b7941dd2a87 100644 --- a/v3/internal/parser/models.go +++ b/v3/internal/parser/models.go @@ -3,11 +3,12 @@ package parser import ( "bytes" "embed" - "github.com/wailsapp/wails/v3/internal/flags" "io" "sort" "strings" "text/template" + + "github.com/wailsapp/wails/v3/internal/flags" ) //go:embed templates @@ -36,7 +37,7 @@ func (p *Project) GenerateModel(wr io.Writer, def *ModelDefinitions, options *fl tmpl, err := template.New(templateName).ParseFS(templates, "templates/"+templateName) if err != nil { - println("Unable to create class template: " + err.Error()) + println("Unable to initialize model template: " + err.Error()) return err } diff --git a/v3/internal/parser/parser.go b/v3/internal/parser/parser.go index 7dfe4ef96ad..b01bd2f8cd7 100644 --- a/v3/internal/parser/parser.go +++ b/v3/internal/parser/parser.go @@ -351,27 +351,32 @@ func GenerateBindingsAndModels(options *flags.GenerateBindingsOptions) (*Project if err != nil { return p, err } + p.outputDirectory = options.OutputDirectory + for _, pkg := range p.BoundMethods { for _, boundMethods := range pkg { p.Stats.NumMethods += len(boundMethods) } } - generatedMethods := p.GenerateBindings(p.BoundMethods, options.UseIDs, options.TS) - for pkg, structs := range generatedMethods { + + generatedMethods := p.GenerateBindings(p.BoundMethods, options.ModelsFilename, options.UseIDs, options.TS, options.UseBundledRuntime) + for pkgDir, structs := range generatedMethods { // Write the directory - err = os.MkdirAll(filepath.Join(options.OutputDirectory, pkg), 0755) + err = os.MkdirAll(filepath.Join(options.OutputDirectory, pkgDir), 0755) if err != nil && !os.IsExist(err) { return p, err } // Write the files for structName, text := range structs { p.Stats.NumStructs++ - filename := structName + ".js" + var filename string if options.TS { filename = structName + ".ts" + } else { + filename = structName + ".js" } - err = os.WriteFile(filepath.Join(options.OutputDirectory, pkg, filename), []byte(text), 0644) + err = os.WriteFile(filepath.Join(options.OutputDirectory, pkgDir, filename), []byte(text), 0644) if err != nil { return p, err } @@ -387,12 +392,20 @@ func GenerateBindingsAndModels(options *flags.GenerateBindingsOptions) (*Project if err != nil { return p, err } - for pkg, text := range generatedModels { - // Get directory for package - pkgInfo := p.packageCache[pkg] - relativePackageDir := p.RelativeBindingsDir(pkgInfo, pkgInfo) + for pkgDir, text := range generatedModels { // Write the directory - err = os.WriteFile(filepath.Join(options.OutputDirectory, relativePackageDir, options.ModelsFilename), []byte(text), 0644) + err = os.MkdirAll(filepath.Join(options.OutputDirectory, pkgDir), 0755) + if err != nil && !os.IsExist(err) { + return p, err + } + // Write the file + var filename string + if options.TS { + filename = options.ModelsFilename + ".ts" + } else { + filename = options.ModelsFilename + ".js" + } + err = os.WriteFile(filepath.Join(options.OutputDirectory, pkgDir, filename), []byte(text), 0644) } if err != nil { return p, err @@ -1175,25 +1188,35 @@ func (p *Project) parseTypes(pkgs map[string]*ParsedPackage) { } func (p *Project) RelativeBindingsDir(dir *ParsedPackage, dir2 *ParsedPackage) string { - if dir.Dir == dir2.Dir { return "." } - // Calculate the relative path from the bindings directory to the package directory - absoluteSourceDir := dir.Dir - if absoluteSourceDir == p.Path { + // Calculate the relative path from the bindings directory of dir to that of dir2 + var ( + absoluteSourceDir string + absoluteTargetDir string + ) + + if dir.Dir == p.Path { absoluteSourceDir = filepath.Join(p.Path, p.outputDirectory, "main") } else { - absoluteSourceDir = dir.Dir + relativeSourceDir := strings.TrimPrefix(dir.Dir, p.Path) + absoluteSourceDir = filepath.Join(p.Path, p.outputDirectory, relativeSourceDir) } - targetRelativeDir := strings.TrimPrefix(dir2.Dir, p.Path) - targetBindingsDir := filepath.Join(p.Path, p.outputDirectory, targetRelativeDir) - // Calculate the relative path from the source directory to the target directory - relativePath, err := filepath.Rel(absoluteSourceDir, targetBindingsDir) + + if dir2.Dir == p.Path { + absoluteTargetDir = filepath.Join(p.Path, p.outputDirectory, "main") + } else { + relativeTargetDir := strings.TrimPrefix(dir2.Dir, p.Path) + absoluteTargetDir = filepath.Join(p.Path, p.outputDirectory, relativeTargetDir) + } + + relativePath, err := filepath.Rel(absoluteSourceDir, absoluteTargetDir) if err != nil { panic(err) } + return filepath.ToSlash(relativePath) } diff --git a/v3/internal/parser/testdata/enum/frontend/bindings/main/GreetService.js b/v3/internal/parser/testdata/enum/frontend/bindings/main/GreetService.js index 736cd809176..e8ac1aa2e0f 100644 --- a/v3/internal/parser/testdata/enum/frontend/bindings/main/GreetService.js +++ b/v3/internal/parser/testdata/enum/frontend/bindings/main/GreetService.js @@ -9,7 +9,7 @@ import {Call} from '@wailsio/runtime'; */ /** - * Greet does XYZ + * Greet does XYZ * @function Greet * @param name {string} * @param title {Title} @@ -20,7 +20,7 @@ export async function Greet(name, title) { } /** - * NewPerson creates a new person + * NewPerson creates a new person * @function NewPerson * @param name {string} * @returns {Promise} diff --git a/v3/internal/parser/testdata/enum/frontend/bindings/main/GreetService.name.js b/v3/internal/parser/testdata/enum/frontend/bindings/main/GreetService.name.js index 25facc4dec6..adf9778c3ae 100644 --- a/v3/internal/parser/testdata/enum/frontend/bindings/main/GreetService.name.js +++ b/v3/internal/parser/testdata/enum/frontend/bindings/main/GreetService.name.js @@ -8,7 +8,7 @@ */ /** - * Greet does XYZ + * Greet does XYZ * @function Greet * @param name {string} * @param title {Title} @@ -19,7 +19,7 @@ export async function Greet(name, title) { } /** - * NewPerson creates a new person + * NewPerson creates a new person * @function NewPerson * @param name {string} * @returns {Promise} diff --git a/v3/internal/parser/testdata/enum_from_imported_package/frontend/bindings/main/GreetService.js b/v3/internal/parser/testdata/enum_from_imported_package/frontend/bindings/main/GreetService.js index c1574fa46a8..bb0ba551264 100644 --- a/v3/internal/parser/testdata/enum_from_imported_package/frontend/bindings/main/GreetService.js +++ b/v3/internal/parser/testdata/enum_from_imported_package/frontend/bindings/main/GreetService.js @@ -8,7 +8,7 @@ import {Call} from '@wailsio/runtime'; */ /** - * Greet does XYZ + * Greet does XYZ * @function Greet * @param name {string} * @param title {servicesTitle} diff --git a/v3/internal/parser/testdata/enum_from_imported_package/frontend/bindings/main/GreetService.name.js b/v3/internal/parser/testdata/enum_from_imported_package/frontend/bindings/main/GreetService.name.js index 672f859e1be..c2c41ee6f70 100644 --- a/v3/internal/parser/testdata/enum_from_imported_package/frontend/bindings/main/GreetService.name.js +++ b/v3/internal/parser/testdata/enum_from_imported_package/frontend/bindings/main/GreetService.name.js @@ -8,7 +8,7 @@ import {Call} from '@wailsio/runtime'; */ /** - * Greet does XYZ + * Greet does XYZ * @function Greet * @param name {string} * @param title {servicesTitle} diff --git a/v3/internal/parser/testdata/function_from_imported_package/frontend/bindings/main/GreetService.js b/v3/internal/parser/testdata/function_from_imported_package/frontend/bindings/main/GreetService.js index 7d9510b20ed..f1343c2d7b7 100644 --- a/v3/internal/parser/testdata/function_from_imported_package/frontend/bindings/main/GreetService.js +++ b/v3/internal/parser/testdata/function_from_imported_package/frontend/bindings/main/GreetService.js @@ -8,7 +8,7 @@ import {Call} from '@wailsio/runtime'; */ /** - * Greet does XYZ + * Greet does XYZ * @function Greet * @param name {string} * @returns {Promise} @@ -18,7 +18,7 @@ export async function Greet(name) { } /** - * NewPerson creates a new person + * NewPerson creates a new person * @function NewPerson * @param name {string} * @returns {Promise} diff --git a/v3/internal/parser/testdata/function_from_imported_package/frontend/bindings/main/GreetService.name.js b/v3/internal/parser/testdata/function_from_imported_package/frontend/bindings/main/GreetService.name.js index 38558e41c9c..30610a58aa1 100644 --- a/v3/internal/parser/testdata/function_from_imported_package/frontend/bindings/main/GreetService.name.js +++ b/v3/internal/parser/testdata/function_from_imported_package/frontend/bindings/main/GreetService.name.js @@ -8,7 +8,7 @@ import {Call} from '@wailsio/runtime'; */ /** - * Greet does XYZ + * Greet does XYZ * @function Greet * @param name {string} * @returns {Promise} @@ -18,7 +18,7 @@ export async function Greet(name) { } /** - * NewPerson creates a new person + * NewPerson creates a new person * @function NewPerson * @param name {string} * @returns {Promise} diff --git a/v3/internal/parser/testdata/function_from_imported_package/frontend/bindings/services/OtherService.js b/v3/internal/parser/testdata/function_from_imported_package/frontend/bindings/services/OtherService.js index b633616da1b..b114d5a2997 100644 --- a/v3/internal/parser/testdata/function_from_imported_package/frontend/bindings/services/OtherService.js +++ b/v3/internal/parser/testdata/function_from_imported_package/frontend/bindings/services/OtherService.js @@ -8,7 +8,7 @@ import {Call} from '@wailsio/runtime'; */ /** - * Yay does this and that + * Yay does this and that * @function Yay * @returns {Promise
} **/ diff --git a/v3/internal/parser/testdata/function_from_imported_package/frontend/bindings/services/OtherService.name.js b/v3/internal/parser/testdata/function_from_imported_package/frontend/bindings/services/OtherService.name.js index 4d3d71c5b4a..10240b9a676 100644 --- a/v3/internal/parser/testdata/function_from_imported_package/frontend/bindings/services/OtherService.name.js +++ b/v3/internal/parser/testdata/function_from_imported_package/frontend/bindings/services/OtherService.name.js @@ -8,7 +8,7 @@ import {Call} from '@wailsio/runtime'; */ /** - * Yay does this and that + * Yay does this and that * @function Yay * @returns {Promise
} **/ diff --git a/v3/internal/parser/testdata/function_from_nested_imported_package/frontend/bindings/main/GreetService.js b/v3/internal/parser/testdata/function_from_nested_imported_package/frontend/bindings/main/GreetService.js index 7d9510b20ed..f1343c2d7b7 100644 --- a/v3/internal/parser/testdata/function_from_nested_imported_package/frontend/bindings/main/GreetService.js +++ b/v3/internal/parser/testdata/function_from_nested_imported_package/frontend/bindings/main/GreetService.js @@ -8,7 +8,7 @@ import {Call} from '@wailsio/runtime'; */ /** - * Greet does XYZ + * Greet does XYZ * @function Greet * @param name {string} * @returns {Promise} @@ -18,7 +18,7 @@ export async function Greet(name) { } /** - * NewPerson creates a new person + * NewPerson creates a new person * @function NewPerson * @param name {string} * @returns {Promise} diff --git a/v3/internal/parser/testdata/function_from_nested_imported_package/frontend/bindings/main/GreetService.name.js b/v3/internal/parser/testdata/function_from_nested_imported_package/frontend/bindings/main/GreetService.name.js index 38558e41c9c..30610a58aa1 100644 --- a/v3/internal/parser/testdata/function_from_nested_imported_package/frontend/bindings/main/GreetService.name.js +++ b/v3/internal/parser/testdata/function_from_nested_imported_package/frontend/bindings/main/GreetService.name.js @@ -8,7 +8,7 @@ import {Call} from '@wailsio/runtime'; */ /** - * Greet does XYZ + * Greet does XYZ * @function Greet * @param name {string} * @returns {Promise} @@ -18,7 +18,7 @@ export async function Greet(name) { } /** - * NewPerson creates a new person + * NewPerson creates a new person * @function NewPerson * @param name {string} * @returns {Promise} diff --git a/v3/internal/parser/testdata/function_from_nested_imported_package/frontend/bindings/services/other/OtherService.js b/v3/internal/parser/testdata/function_from_nested_imported_package/frontend/bindings/services/other/OtherService.js index c15665231fa..7b04f559a4c 100644 --- a/v3/internal/parser/testdata/function_from_nested_imported_package/frontend/bindings/services/other/OtherService.js +++ b/v3/internal/parser/testdata/function_from_nested_imported_package/frontend/bindings/services/other/OtherService.js @@ -8,7 +8,7 @@ import {Call} from '@wailsio/runtime'; */ /** - * Yay does this and that + * Yay does this and that * @function Yay * @returns {Promise
} **/ diff --git a/v3/internal/parser/testdata/function_from_nested_imported_package/frontend/bindings/services/other/OtherService.name.js b/v3/internal/parser/testdata/function_from_nested_imported_package/frontend/bindings/services/other/OtherService.name.js index bb8f1abb7ac..b3a66aa5b9f 100644 --- a/v3/internal/parser/testdata/function_from_nested_imported_package/frontend/bindings/services/other/OtherService.name.js +++ b/v3/internal/parser/testdata/function_from_nested_imported_package/frontend/bindings/services/other/OtherService.name.js @@ -8,7 +8,7 @@ import {Call} from '@wailsio/runtime'; */ /** - * Yay does this and that + * Yay does this and that * @function Yay * @returns {Promise
} **/ diff --git a/v3/internal/parser/testdata/function_single/frontend/bindings/main/GreetService.js b/v3/internal/parser/testdata/function_single/frontend/bindings/main/GreetService.js index 6e4ed88f979..993cfb9dcc1 100644 --- a/v3/internal/parser/testdata/function_single/frontend/bindings/main/GreetService.js +++ b/v3/internal/parser/testdata/function_single/frontend/bindings/main/GreetService.js @@ -5,7 +5,7 @@ import {Call} from '@wailsio/runtime'; /** - * Greet someone + * Greet someone * @function Greet * @param name {string} * @returns {Promise} diff --git a/v3/internal/parser/testdata/function_single/frontend/bindings/main/GreetService.name.js b/v3/internal/parser/testdata/function_single/frontend/bindings/main/GreetService.name.js index 020458d0bb3..66dfb05eebd 100644 --- a/v3/internal/parser/testdata/function_single/frontend/bindings/main/GreetService.name.js +++ b/v3/internal/parser/testdata/function_single/frontend/bindings/main/GreetService.name.js @@ -5,7 +5,7 @@ import {Call} from '@wailsio/runtime'; /** - * Greet someone + * Greet someone * @function Greet * @param name {string} * @returns {Promise} diff --git a/v3/internal/parser/testdata/function_single_context/frontend/bindings/main/GreetService.js b/v3/internal/parser/testdata/function_single_context/frontend/bindings/main/GreetService.js index 755148ee451..4196491e15c 100644 --- a/v3/internal/parser/testdata/function_single_context/frontend/bindings/main/GreetService.js +++ b/v3/internal/parser/testdata/function_single_context/frontend/bindings/main/GreetService.js @@ -5,7 +5,7 @@ import {Call} from '@wailsio/runtime'; /** - * Greet someone + * Greet someone * @function Greet * @param name {string} * @returns {Promise} @@ -15,7 +15,7 @@ export async function Greet(name) { } /** - * Greet someone + * Greet someone * @function GreetWithContext * @param name {string} * @returns {Promise} diff --git a/v3/internal/parser/testdata/function_single_context/frontend/bindings/main/GreetService.name.js b/v3/internal/parser/testdata/function_single_context/frontend/bindings/main/GreetService.name.js index e08e79d3975..33a5f9366bf 100644 --- a/v3/internal/parser/testdata/function_single_context/frontend/bindings/main/GreetService.name.js +++ b/v3/internal/parser/testdata/function_single_context/frontend/bindings/main/GreetService.name.js @@ -5,7 +5,7 @@ import {Call} from '@wailsio/runtime'; /** - * Greet someone + * Greet someone * @function Greet * @param name {string} * @returns {Promise} @@ -15,7 +15,7 @@ export async function Greet(name) { } /** - * Greet someone + * Greet someone * @function GreetWithContext * @param name {string} * @returns {Promise} diff --git a/v3/internal/parser/testdata/struct_literal_multiple/frontend/bindings/main/GreetService.js b/v3/internal/parser/testdata/struct_literal_multiple/frontend/bindings/main/GreetService.js index e105b2c6edb..4e758c8c320 100644 --- a/v3/internal/parser/testdata/struct_literal_multiple/frontend/bindings/main/GreetService.js +++ b/v3/internal/parser/testdata/struct_literal_multiple/frontend/bindings/main/GreetService.js @@ -4,7 +4,7 @@ import {Call} from '@wailsio/runtime'; -/** +/** * @function Greet * @param name {string} * @returns {Promise} diff --git a/v3/internal/parser/testdata/struct_literal_multiple/frontend/bindings/main/GreetService.name.js b/v3/internal/parser/testdata/struct_literal_multiple/frontend/bindings/main/GreetService.name.js index e6ca9f6d440..38e7cac771d 100644 --- a/v3/internal/parser/testdata/struct_literal_multiple/frontend/bindings/main/GreetService.name.js +++ b/v3/internal/parser/testdata/struct_literal_multiple/frontend/bindings/main/GreetService.name.js @@ -4,7 +4,7 @@ import {Call} from '@wailsio/runtime'; -/** +/** * @function Greet * @param name {string} * @returns {Promise} diff --git a/v3/internal/parser/testdata/struct_literal_multiple/frontend/bindings/main/OtherService.js b/v3/internal/parser/testdata/struct_literal_multiple/frontend/bindings/main/OtherService.js index fcbe321c92c..d9bed629063 100644 --- a/v3/internal/parser/testdata/struct_literal_multiple/frontend/bindings/main/OtherService.js +++ b/v3/internal/parser/testdata/struct_literal_multiple/frontend/bindings/main/OtherService.js @@ -4,7 +4,7 @@ import {Call} from '@wailsio/runtime'; -/** +/** * @function Hello * @returns {Promise} **/ diff --git a/v3/internal/parser/testdata/struct_literal_multiple/frontend/bindings/main/OtherService.name.js b/v3/internal/parser/testdata/struct_literal_multiple/frontend/bindings/main/OtherService.name.js index 8844c0c559a..678d394ffe5 100644 --- a/v3/internal/parser/testdata/struct_literal_multiple/frontend/bindings/main/OtherService.name.js +++ b/v3/internal/parser/testdata/struct_literal_multiple/frontend/bindings/main/OtherService.name.js @@ -4,7 +4,7 @@ import {Call} from '@wailsio/runtime'; -/** +/** * @function Hello * @returns {Promise} **/ diff --git a/v3/internal/parser/testdata/struct_literal_multiple_files/frontend/bindings/main/GreetService.js b/v3/internal/parser/testdata/struct_literal_multiple_files/frontend/bindings/main/GreetService.js index e105b2c6edb..4e758c8c320 100644 --- a/v3/internal/parser/testdata/struct_literal_multiple_files/frontend/bindings/main/GreetService.js +++ b/v3/internal/parser/testdata/struct_literal_multiple_files/frontend/bindings/main/GreetService.js @@ -4,7 +4,7 @@ import {Call} from '@wailsio/runtime'; -/** +/** * @function Greet * @param name {string} * @returns {Promise} diff --git a/v3/internal/parser/testdata/struct_literal_multiple_files/frontend/bindings/main/GreetService.name.js b/v3/internal/parser/testdata/struct_literal_multiple_files/frontend/bindings/main/GreetService.name.js index e6ca9f6d440..38e7cac771d 100644 --- a/v3/internal/parser/testdata/struct_literal_multiple_files/frontend/bindings/main/GreetService.name.js +++ b/v3/internal/parser/testdata/struct_literal_multiple_files/frontend/bindings/main/GreetService.name.js @@ -4,7 +4,7 @@ import {Call} from '@wailsio/runtime'; -/** +/** * @function Greet * @param name {string} * @returns {Promise} diff --git a/v3/internal/parser/testdata/struct_literal_multiple_files/frontend/bindings/main/OtherService.js b/v3/internal/parser/testdata/struct_literal_multiple_files/frontend/bindings/main/OtherService.js index fcbe321c92c..d9bed629063 100644 --- a/v3/internal/parser/testdata/struct_literal_multiple_files/frontend/bindings/main/OtherService.js +++ b/v3/internal/parser/testdata/struct_literal_multiple_files/frontend/bindings/main/OtherService.js @@ -4,7 +4,7 @@ import {Call} from '@wailsio/runtime'; -/** +/** * @function Hello * @returns {Promise} **/ diff --git a/v3/internal/parser/testdata/struct_literal_multiple_files/frontend/bindings/main/OtherService.name.js b/v3/internal/parser/testdata/struct_literal_multiple_files/frontend/bindings/main/OtherService.name.js index 8844c0c559a..678d394ffe5 100644 --- a/v3/internal/parser/testdata/struct_literal_multiple_files/frontend/bindings/main/OtherService.name.js +++ b/v3/internal/parser/testdata/struct_literal_multiple_files/frontend/bindings/main/OtherService.name.js @@ -4,7 +4,7 @@ import {Call} from '@wailsio/runtime'; -/** +/** * @function Hello * @returns {Promise} **/ diff --git a/v3/internal/parser/testdata/struct_literal_multiple_other/frontend/bindings/main/GreetService.js b/v3/internal/parser/testdata/struct_literal_multiple_other/frontend/bindings/main/GreetService.js index 7d9510b20ed..f1343c2d7b7 100644 --- a/v3/internal/parser/testdata/struct_literal_multiple_other/frontend/bindings/main/GreetService.js +++ b/v3/internal/parser/testdata/struct_literal_multiple_other/frontend/bindings/main/GreetService.js @@ -8,7 +8,7 @@ import {Call} from '@wailsio/runtime'; */ /** - * Greet does XYZ + * Greet does XYZ * @function Greet * @param name {string} * @returns {Promise} @@ -18,7 +18,7 @@ export async function Greet(name) { } /** - * NewPerson creates a new person + * NewPerson creates a new person * @function NewPerson * @param name {string} * @returns {Promise} diff --git a/v3/internal/parser/testdata/struct_literal_multiple_other/frontend/bindings/main/GreetService.name.js b/v3/internal/parser/testdata/struct_literal_multiple_other/frontend/bindings/main/GreetService.name.js index 38558e41c9c..30610a58aa1 100644 --- a/v3/internal/parser/testdata/struct_literal_multiple_other/frontend/bindings/main/GreetService.name.js +++ b/v3/internal/parser/testdata/struct_literal_multiple_other/frontend/bindings/main/GreetService.name.js @@ -8,7 +8,7 @@ import {Call} from '@wailsio/runtime'; */ /** - * Greet does XYZ + * Greet does XYZ * @function Greet * @param name {string} * @returns {Promise} @@ -18,7 +18,7 @@ export async function Greet(name) { } /** - * NewPerson creates a new person + * NewPerson creates a new person * @function NewPerson * @param name {string} * @returns {Promise} diff --git a/v3/internal/parser/testdata/struct_literal_multiple_other/frontend/bindings/services/OtherService.js b/v3/internal/parser/testdata/struct_literal_multiple_other/frontend/bindings/services/OtherService.js index 5634540378b..d2793204151 100644 --- a/v3/internal/parser/testdata/struct_literal_multiple_other/frontend/bindings/services/OtherService.js +++ b/v3/internal/parser/testdata/struct_literal_multiple_other/frontend/bindings/services/OtherService.js @@ -8,7 +8,7 @@ import {Call} from '@wailsio/runtime'; */ /** - * Yay does this and that + * Yay does this and that * @function Yay * @returns {Promise
} **/ diff --git a/v3/internal/parser/testdata/struct_literal_multiple_other/frontend/bindings/services/OtherService.name.js b/v3/internal/parser/testdata/struct_literal_multiple_other/frontend/bindings/services/OtherService.name.js index 4d3d71c5b4a..10240b9a676 100644 --- a/v3/internal/parser/testdata/struct_literal_multiple_other/frontend/bindings/services/OtherService.name.js +++ b/v3/internal/parser/testdata/struct_literal_multiple_other/frontend/bindings/services/OtherService.name.js @@ -8,7 +8,7 @@ import {Call} from '@wailsio/runtime'; */ /** - * Yay does this and that + * Yay does this and that * @function Yay * @returns {Promise
} **/ diff --git a/v3/internal/parser/testdata/struct_literal_non_pointer_single/frontend/bindings/main/GreetService.js b/v3/internal/parser/testdata/struct_literal_non_pointer_single/frontend/bindings/main/GreetService.js index 66d3c141559..f3d0b247951 100644 --- a/v3/internal/parser/testdata/struct_literal_non_pointer_single/frontend/bindings/main/GreetService.js +++ b/v3/internal/parser/testdata/struct_literal_non_pointer_single/frontend/bindings/main/GreetService.js @@ -7,7 +7,7 @@ import {Call} from '@wailsio/runtime'; * @typedef {import('./models').Person} Person */ -/** +/** * @function ArrayInt * @param _in {number[]} * @returns {Promise} @@ -16,7 +16,7 @@ export async function ArrayInt(_in) { return Call.ByID(3862002418, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function BoolInBoolOut * @param _in {boolean} * @returns {Promise} @@ -25,7 +25,7 @@ export async function BoolInBoolOut(_in) { return Call.ByID(2424639793, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Float32InFloat32Out * @param _in {number} * @returns {Promise} @@ -34,7 +34,7 @@ export async function Float32InFloat32Out(_in) { return Call.ByID(3132595881, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Float64InFloat64Out * @param _in {number} * @returns {Promise} @@ -44,7 +44,7 @@ export async function Float64InFloat64Out(_in) { } /** - * Greet someone + * Greet someone * @function Greet * @param name {string} * @returns {Promise} @@ -53,7 +53,7 @@ export async function Greet(name) { return Call.ByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Int16InIntOut * @param _in {number} * @returns {Promise} @@ -62,7 +62,7 @@ export async function Int16InIntOut(_in) { return Call.ByID(3306292566, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Int16PointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -71,7 +71,7 @@ export async function Int16PointerInAndOutput(_in) { return Call.ByID(1754277916, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Int32InIntOut * @param _in {number} * @returns {Promise} @@ -80,7 +80,7 @@ export async function Int32InIntOut(_in) { return Call.ByID(1909469092, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Int32PointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -89,7 +89,7 @@ export async function Int32PointerInAndOutput(_in) { return Call.ByID(4251088558, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Int64InIntOut * @param _in {number} * @returns {Promise} @@ -98,7 +98,7 @@ export async function Int64InIntOut(_in) { return Call.ByID(1343888303, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Int64PointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -107,7 +107,7 @@ export async function Int64PointerInAndOutput(_in) { return Call.ByID(2205561041, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Int8InIntOut * @param _in {number} * @returns {Promise} @@ -116,7 +116,7 @@ export async function Int8InIntOut(_in) { return Call.ByID(572240879, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Int8PointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -125,7 +125,7 @@ export async function Int8PointerInAndOutput(_in) { return Call.ByID(2189402897, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function IntInIntOut * @param _in {number} * @returns {Promise} @@ -134,7 +134,7 @@ export async function IntInIntOut(_in) { return Call.ByID(642881729, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function IntPointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -143,7 +143,7 @@ export async function IntPointerInAndOutput(_in) { return Call.ByID(1066151743, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function IntPointerInputNamedOutputs * @param _in {number | null} * @returns {Promise} @@ -152,7 +152,7 @@ export async function IntPointerInputNamedOutputs(_in) { return Call.ByID(2718999663, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function MapIntInt * @param _in {map} * @returns {Promise} @@ -161,7 +161,7 @@ export async function MapIntInt(_in) { return Call.ByID(2386486356, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function MapIntPointerInt * @param _in {map} * @returns {Promise} @@ -170,7 +170,7 @@ export async function MapIntPointerInt(_in) { return Call.ByID(550413585, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function MapIntSliceInt * @param _in {map} * @returns {Promise} @@ -179,7 +179,7 @@ export async function MapIntSliceInt(_in) { return Call.ByID(2900172572, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function MapIntSliceIntInMapIntSliceIntOut * @param _in {map} * @returns {Promise} @@ -188,7 +188,7 @@ export async function MapIntSliceIntInMapIntSliceIntOut(_in) { return Call.ByID(881980169, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function NoInputsStringOut * @returns {Promise} **/ @@ -196,7 +196,7 @@ export async function NoInputsStringOut() { return Call.ByID(1075577233, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function PointerBoolInBoolOut * @param _in {boolean | null} * @returns {Promise} @@ -205,7 +205,7 @@ export async function PointerBoolInBoolOut(_in) { return Call.ByID(3589606958, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function PointerFloat32InFloat32Out * @param _in {number | null} * @returns {Promise} @@ -214,7 +214,7 @@ export async function PointerFloat32InFloat32Out(_in) { return Call.ByID(224675106, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function PointerFloat64InFloat64Out * @param _in {number | null} * @returns {Promise} @@ -223,7 +223,7 @@ export async function PointerFloat64InFloat64Out(_in) { return Call.ByID(2124953624, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function PointerMapIntInt * @param _in {map | null} * @returns {Promise} @@ -232,7 +232,7 @@ export async function PointerMapIntInt(_in) { return Call.ByID(3516977899, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function PointerStringInStringOut * @param _in {string | null} * @returns {Promise} @@ -241,7 +241,7 @@ export async function PointerStringInStringOut(_in) { return Call.ByID(229603958, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function StringArrayInputNamedOutput * @param _in {string[]} * @returns {Promise} @@ -250,7 +250,7 @@ export async function StringArrayInputNamedOutput(_in) { return Call.ByID(3678582682, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function StringArrayInputNamedOutputs * @param _in {string[]} * @returns {Promise} @@ -259,7 +259,7 @@ export async function StringArrayInputNamedOutputs(_in) { return Call.ByID(319259595, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function StringArrayInputStringArrayOut * @param _in {string[]} * @returns {Promise} @@ -268,7 +268,7 @@ export async function StringArrayInputStringArrayOut(_in) { return Call.ByID(383995060, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function StringArrayInputStringOut * @param _in {string[]} * @returns {Promise} @@ -277,7 +277,7 @@ export async function StringArrayInputStringOut(_in) { return Call.ByID(1091960237, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function StructInputStructOutput * @param _in {Person} * @returns {Promise} @@ -286,7 +286,7 @@ export async function StructInputStructOutput(_in) { return Call.ByID(3835643147, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function StructPointerInputErrorOutput * @param _in {Person | null} * @returns {Promise} @@ -295,7 +295,7 @@ export async function StructPointerInputErrorOutput(_in) { return Call.ByID(2447692557, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function StructPointerInputStructPointerOutput * @param _in {Person | null} * @returns {Promise} @@ -304,7 +304,7 @@ export async function StructPointerInputStructPointerOutput(_in) { return Call.ByID(2943477349, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UInt16InUIntOut * @param _in {number} * @returns {Promise} @@ -313,7 +313,7 @@ export async function UInt16InUIntOut(_in) { return Call.ByID(3401034892, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UInt16PointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -322,7 +322,7 @@ export async function UInt16PointerInAndOutput(_in) { return Call.ByID(1236957573, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UInt32InUIntOut * @param _in {number} * @returns {Promise} @@ -331,7 +331,7 @@ export async function UInt32InUIntOut(_in) { return Call.ByID(1160383782, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UInt32PointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -340,7 +340,7 @@ export async function UInt32PointerInAndOutput(_in) { return Call.ByID(1739300671, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UInt64InUIntOut * @param _in {number} * @returns {Promise} @@ -349,7 +349,7 @@ export async function UInt64InUIntOut(_in) { return Call.ByID(793803239, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UInt64PointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -358,7 +358,7 @@ export async function UInt64PointerInAndOutput(_in) { return Call.ByID(1403757716, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UInt8InUIntOut * @param _in {number} * @returns {Promise} @@ -367,7 +367,7 @@ export async function UInt8InUIntOut(_in) { return Call.ByID(2988345717, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UInt8PointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -376,7 +376,7 @@ export async function UInt8PointerInAndOutput(_in) { return Call.ByID(518250834, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UIntInUIntOut * @param _in {number} * @returns {Promise} @@ -385,7 +385,7 @@ export async function UIntInUIntOut(_in) { return Call.ByID(2836661285, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UIntPointerInAndOutput * @param _in {number | null} * @returns {Promise} diff --git a/v3/internal/parser/testdata/struct_literal_non_pointer_single/frontend/bindings/main/GreetService.name.js b/v3/internal/parser/testdata/struct_literal_non_pointer_single/frontend/bindings/main/GreetService.name.js index 9982bea9a69..026bc3be501 100644 --- a/v3/internal/parser/testdata/struct_literal_non_pointer_single/frontend/bindings/main/GreetService.name.js +++ b/v3/internal/parser/testdata/struct_literal_non_pointer_single/frontend/bindings/main/GreetService.name.js @@ -7,7 +7,7 @@ import {Call} from '@wailsio/runtime'; * @typedef {import('./models').Person} Person */ -/** +/** * @function ArrayInt * @param _in {number[]} * @returns {Promise} @@ -16,7 +16,7 @@ export async function ArrayInt(_in) { return Call.ByName("main.GreetService.ArrayInt", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function BoolInBoolOut * @param _in {boolean} * @returns {Promise} @@ -25,7 +25,7 @@ export async function BoolInBoolOut(_in) { return Call.ByName("main.GreetService.BoolInBoolOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Float32InFloat32Out * @param _in {number} * @returns {Promise} @@ -34,7 +34,7 @@ export async function Float32InFloat32Out(_in) { return Call.ByName("main.GreetService.Float32InFloat32Out", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Float64InFloat64Out * @param _in {number} * @returns {Promise} @@ -44,7 +44,7 @@ export async function Float64InFloat64Out(_in) { } /** - * Greet someone + * Greet someone * @function Greet * @param name {string} * @returns {Promise} @@ -53,7 +53,7 @@ export async function Greet(name) { return Call.ByName("main.GreetService.Greet", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Int16InIntOut * @param _in {number} * @returns {Promise} @@ -62,7 +62,7 @@ export async function Int16InIntOut(_in) { return Call.ByName("main.GreetService.Int16InIntOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Int16PointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -71,7 +71,7 @@ export async function Int16PointerInAndOutput(_in) { return Call.ByName("main.GreetService.Int16PointerInAndOutput", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Int32InIntOut * @param _in {number} * @returns {Promise} @@ -80,7 +80,7 @@ export async function Int32InIntOut(_in) { return Call.ByName("main.GreetService.Int32InIntOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Int32PointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -89,7 +89,7 @@ export async function Int32PointerInAndOutput(_in) { return Call.ByName("main.GreetService.Int32PointerInAndOutput", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Int64InIntOut * @param _in {number} * @returns {Promise} @@ -98,7 +98,7 @@ export async function Int64InIntOut(_in) { return Call.ByName("main.GreetService.Int64InIntOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Int64PointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -107,7 +107,7 @@ export async function Int64PointerInAndOutput(_in) { return Call.ByName("main.GreetService.Int64PointerInAndOutput", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Int8InIntOut * @param _in {number} * @returns {Promise} @@ -116,7 +116,7 @@ export async function Int8InIntOut(_in) { return Call.ByName("main.GreetService.Int8InIntOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Int8PointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -125,7 +125,7 @@ export async function Int8PointerInAndOutput(_in) { return Call.ByName("main.GreetService.Int8PointerInAndOutput", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function IntInIntOut * @param _in {number} * @returns {Promise} @@ -134,7 +134,7 @@ export async function IntInIntOut(_in) { return Call.ByName("main.GreetService.IntInIntOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function IntPointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -143,7 +143,7 @@ export async function IntPointerInAndOutput(_in) { return Call.ByName("main.GreetService.IntPointerInAndOutput", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function IntPointerInputNamedOutputs * @param _in {number | null} * @returns {Promise} @@ -152,7 +152,7 @@ export async function IntPointerInputNamedOutputs(_in) { return Call.ByName("main.GreetService.IntPointerInputNamedOutputs", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function MapIntInt * @param _in {map} * @returns {Promise} @@ -161,7 +161,7 @@ export async function MapIntInt(_in) { return Call.ByName("main.GreetService.MapIntInt", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function MapIntPointerInt * @param _in {map} * @returns {Promise} @@ -170,7 +170,7 @@ export async function MapIntPointerInt(_in) { return Call.ByName("main.GreetService.MapIntPointerInt", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function MapIntSliceInt * @param _in {map} * @returns {Promise} @@ -179,7 +179,7 @@ export async function MapIntSliceInt(_in) { return Call.ByName("main.GreetService.MapIntSliceInt", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function MapIntSliceIntInMapIntSliceIntOut * @param _in {map} * @returns {Promise} @@ -188,7 +188,7 @@ export async function MapIntSliceIntInMapIntSliceIntOut(_in) { return Call.ByName("main.GreetService.MapIntSliceIntInMapIntSliceIntOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function NoInputsStringOut * @returns {Promise} **/ @@ -196,7 +196,7 @@ export async function NoInputsStringOut() { return Call.ByName("main.GreetService.NoInputsStringOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function PointerBoolInBoolOut * @param _in {boolean | null} * @returns {Promise} @@ -205,7 +205,7 @@ export async function PointerBoolInBoolOut(_in) { return Call.ByName("main.GreetService.PointerBoolInBoolOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function PointerFloat32InFloat32Out * @param _in {number | null} * @returns {Promise} @@ -214,7 +214,7 @@ export async function PointerFloat32InFloat32Out(_in) { return Call.ByName("main.GreetService.PointerFloat32InFloat32Out", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function PointerFloat64InFloat64Out * @param _in {number | null} * @returns {Promise} @@ -223,7 +223,7 @@ export async function PointerFloat64InFloat64Out(_in) { return Call.ByName("main.GreetService.PointerFloat64InFloat64Out", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function PointerMapIntInt * @param _in {map | null} * @returns {Promise} @@ -232,7 +232,7 @@ export async function PointerMapIntInt(_in) { return Call.ByName("main.GreetService.PointerMapIntInt", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function PointerStringInStringOut * @param _in {string | null} * @returns {Promise} @@ -241,7 +241,7 @@ export async function PointerStringInStringOut(_in) { return Call.ByName("main.GreetService.PointerStringInStringOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function StringArrayInputNamedOutput * @param _in {string[]} * @returns {Promise} @@ -250,7 +250,7 @@ export async function StringArrayInputNamedOutput(_in) { return Call.ByName("main.GreetService.StringArrayInputNamedOutput", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function StringArrayInputNamedOutputs * @param _in {string[]} * @returns {Promise} @@ -259,7 +259,7 @@ export async function StringArrayInputNamedOutputs(_in) { return Call.ByName("main.GreetService.StringArrayInputNamedOutputs", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function StringArrayInputStringArrayOut * @param _in {string[]} * @returns {Promise} @@ -268,7 +268,7 @@ export async function StringArrayInputStringArrayOut(_in) { return Call.ByName("main.GreetService.StringArrayInputStringArrayOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function StringArrayInputStringOut * @param _in {string[]} * @returns {Promise} @@ -277,7 +277,7 @@ export async function StringArrayInputStringOut(_in) { return Call.ByName("main.GreetService.StringArrayInputStringOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function StructInputStructOutput * @param _in {Person} * @returns {Promise} @@ -286,7 +286,7 @@ export async function StructInputStructOutput(_in) { return Call.ByName("main.GreetService.StructInputStructOutput", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function StructPointerInputErrorOutput * @param _in {Person | null} * @returns {Promise} @@ -295,7 +295,7 @@ export async function StructPointerInputErrorOutput(_in) { return Call.ByName("main.GreetService.StructPointerInputErrorOutput", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function StructPointerInputStructPointerOutput * @param _in {Person | null} * @returns {Promise} @@ -304,7 +304,7 @@ export async function StructPointerInputStructPointerOutput(_in) { return Call.ByName("main.GreetService.StructPointerInputStructPointerOutput", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UInt16InUIntOut * @param _in {number} * @returns {Promise} @@ -313,7 +313,7 @@ export async function UInt16InUIntOut(_in) { return Call.ByName("main.GreetService.UInt16InUIntOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UInt16PointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -322,7 +322,7 @@ export async function UInt16PointerInAndOutput(_in) { return Call.ByName("main.GreetService.UInt16PointerInAndOutput", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UInt32InUIntOut * @param _in {number} * @returns {Promise} @@ -331,7 +331,7 @@ export async function UInt32InUIntOut(_in) { return Call.ByName("main.GreetService.UInt32InUIntOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UInt32PointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -340,7 +340,7 @@ export async function UInt32PointerInAndOutput(_in) { return Call.ByName("main.GreetService.UInt32PointerInAndOutput", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UInt64InUIntOut * @param _in {number} * @returns {Promise} @@ -349,7 +349,7 @@ export async function UInt64InUIntOut(_in) { return Call.ByName("main.GreetService.UInt64InUIntOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UInt64PointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -358,7 +358,7 @@ export async function UInt64PointerInAndOutput(_in) { return Call.ByName("main.GreetService.UInt64PointerInAndOutput", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UInt8InUIntOut * @param _in {number} * @returns {Promise} @@ -367,7 +367,7 @@ export async function UInt8InUIntOut(_in) { return Call.ByName("main.GreetService.UInt8InUIntOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UInt8PointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -376,7 +376,7 @@ export async function UInt8PointerInAndOutput(_in) { return Call.ByName("main.GreetService.UInt8PointerInAndOutput", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UIntInUIntOut * @param _in {number} * @returns {Promise} @@ -385,7 +385,7 @@ export async function UIntInUIntOut(_in) { return Call.ByName("main.GreetService.UIntInUIntOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UIntPointerInAndOutput * @param _in {number | null} * @returns {Promise} diff --git a/v3/internal/parser/testdata/struct_literal_single/frontend/bindings/main/GreetService.js b/v3/internal/parser/testdata/struct_literal_single/frontend/bindings/main/GreetService.js index 66d3c141559..f3d0b247951 100644 --- a/v3/internal/parser/testdata/struct_literal_single/frontend/bindings/main/GreetService.js +++ b/v3/internal/parser/testdata/struct_literal_single/frontend/bindings/main/GreetService.js @@ -7,7 +7,7 @@ import {Call} from '@wailsio/runtime'; * @typedef {import('./models').Person} Person */ -/** +/** * @function ArrayInt * @param _in {number[]} * @returns {Promise} @@ -16,7 +16,7 @@ export async function ArrayInt(_in) { return Call.ByID(3862002418, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function BoolInBoolOut * @param _in {boolean} * @returns {Promise} @@ -25,7 +25,7 @@ export async function BoolInBoolOut(_in) { return Call.ByID(2424639793, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Float32InFloat32Out * @param _in {number} * @returns {Promise} @@ -34,7 +34,7 @@ export async function Float32InFloat32Out(_in) { return Call.ByID(3132595881, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Float64InFloat64Out * @param _in {number} * @returns {Promise} @@ -44,7 +44,7 @@ export async function Float64InFloat64Out(_in) { } /** - * Greet someone + * Greet someone * @function Greet * @param name {string} * @returns {Promise} @@ -53,7 +53,7 @@ export async function Greet(name) { return Call.ByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Int16InIntOut * @param _in {number} * @returns {Promise} @@ -62,7 +62,7 @@ export async function Int16InIntOut(_in) { return Call.ByID(3306292566, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Int16PointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -71,7 +71,7 @@ export async function Int16PointerInAndOutput(_in) { return Call.ByID(1754277916, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Int32InIntOut * @param _in {number} * @returns {Promise} @@ -80,7 +80,7 @@ export async function Int32InIntOut(_in) { return Call.ByID(1909469092, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Int32PointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -89,7 +89,7 @@ export async function Int32PointerInAndOutput(_in) { return Call.ByID(4251088558, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Int64InIntOut * @param _in {number} * @returns {Promise} @@ -98,7 +98,7 @@ export async function Int64InIntOut(_in) { return Call.ByID(1343888303, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Int64PointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -107,7 +107,7 @@ export async function Int64PointerInAndOutput(_in) { return Call.ByID(2205561041, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Int8InIntOut * @param _in {number} * @returns {Promise} @@ -116,7 +116,7 @@ export async function Int8InIntOut(_in) { return Call.ByID(572240879, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Int8PointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -125,7 +125,7 @@ export async function Int8PointerInAndOutput(_in) { return Call.ByID(2189402897, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function IntInIntOut * @param _in {number} * @returns {Promise} @@ -134,7 +134,7 @@ export async function IntInIntOut(_in) { return Call.ByID(642881729, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function IntPointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -143,7 +143,7 @@ export async function IntPointerInAndOutput(_in) { return Call.ByID(1066151743, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function IntPointerInputNamedOutputs * @param _in {number | null} * @returns {Promise} @@ -152,7 +152,7 @@ export async function IntPointerInputNamedOutputs(_in) { return Call.ByID(2718999663, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function MapIntInt * @param _in {map} * @returns {Promise} @@ -161,7 +161,7 @@ export async function MapIntInt(_in) { return Call.ByID(2386486356, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function MapIntPointerInt * @param _in {map} * @returns {Promise} @@ -170,7 +170,7 @@ export async function MapIntPointerInt(_in) { return Call.ByID(550413585, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function MapIntSliceInt * @param _in {map} * @returns {Promise} @@ -179,7 +179,7 @@ export async function MapIntSliceInt(_in) { return Call.ByID(2900172572, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function MapIntSliceIntInMapIntSliceIntOut * @param _in {map} * @returns {Promise} @@ -188,7 +188,7 @@ export async function MapIntSliceIntInMapIntSliceIntOut(_in) { return Call.ByID(881980169, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function NoInputsStringOut * @returns {Promise} **/ @@ -196,7 +196,7 @@ export async function NoInputsStringOut() { return Call.ByID(1075577233, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function PointerBoolInBoolOut * @param _in {boolean | null} * @returns {Promise} @@ -205,7 +205,7 @@ export async function PointerBoolInBoolOut(_in) { return Call.ByID(3589606958, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function PointerFloat32InFloat32Out * @param _in {number | null} * @returns {Promise} @@ -214,7 +214,7 @@ export async function PointerFloat32InFloat32Out(_in) { return Call.ByID(224675106, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function PointerFloat64InFloat64Out * @param _in {number | null} * @returns {Promise} @@ -223,7 +223,7 @@ export async function PointerFloat64InFloat64Out(_in) { return Call.ByID(2124953624, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function PointerMapIntInt * @param _in {map | null} * @returns {Promise} @@ -232,7 +232,7 @@ export async function PointerMapIntInt(_in) { return Call.ByID(3516977899, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function PointerStringInStringOut * @param _in {string | null} * @returns {Promise} @@ -241,7 +241,7 @@ export async function PointerStringInStringOut(_in) { return Call.ByID(229603958, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function StringArrayInputNamedOutput * @param _in {string[]} * @returns {Promise} @@ -250,7 +250,7 @@ export async function StringArrayInputNamedOutput(_in) { return Call.ByID(3678582682, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function StringArrayInputNamedOutputs * @param _in {string[]} * @returns {Promise} @@ -259,7 +259,7 @@ export async function StringArrayInputNamedOutputs(_in) { return Call.ByID(319259595, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function StringArrayInputStringArrayOut * @param _in {string[]} * @returns {Promise} @@ -268,7 +268,7 @@ export async function StringArrayInputStringArrayOut(_in) { return Call.ByID(383995060, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function StringArrayInputStringOut * @param _in {string[]} * @returns {Promise} @@ -277,7 +277,7 @@ export async function StringArrayInputStringOut(_in) { return Call.ByID(1091960237, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function StructInputStructOutput * @param _in {Person} * @returns {Promise} @@ -286,7 +286,7 @@ export async function StructInputStructOutput(_in) { return Call.ByID(3835643147, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function StructPointerInputErrorOutput * @param _in {Person | null} * @returns {Promise} @@ -295,7 +295,7 @@ export async function StructPointerInputErrorOutput(_in) { return Call.ByID(2447692557, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function StructPointerInputStructPointerOutput * @param _in {Person | null} * @returns {Promise} @@ -304,7 +304,7 @@ export async function StructPointerInputStructPointerOutput(_in) { return Call.ByID(2943477349, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UInt16InUIntOut * @param _in {number} * @returns {Promise} @@ -313,7 +313,7 @@ export async function UInt16InUIntOut(_in) { return Call.ByID(3401034892, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UInt16PointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -322,7 +322,7 @@ export async function UInt16PointerInAndOutput(_in) { return Call.ByID(1236957573, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UInt32InUIntOut * @param _in {number} * @returns {Promise} @@ -331,7 +331,7 @@ export async function UInt32InUIntOut(_in) { return Call.ByID(1160383782, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UInt32PointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -340,7 +340,7 @@ export async function UInt32PointerInAndOutput(_in) { return Call.ByID(1739300671, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UInt64InUIntOut * @param _in {number} * @returns {Promise} @@ -349,7 +349,7 @@ export async function UInt64InUIntOut(_in) { return Call.ByID(793803239, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UInt64PointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -358,7 +358,7 @@ export async function UInt64PointerInAndOutput(_in) { return Call.ByID(1403757716, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UInt8InUIntOut * @param _in {number} * @returns {Promise} @@ -367,7 +367,7 @@ export async function UInt8InUIntOut(_in) { return Call.ByID(2988345717, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UInt8PointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -376,7 +376,7 @@ export async function UInt8PointerInAndOutput(_in) { return Call.ByID(518250834, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UIntInUIntOut * @param _in {number} * @returns {Promise} @@ -385,7 +385,7 @@ export async function UIntInUIntOut(_in) { return Call.ByID(2836661285, ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UIntPointerInAndOutput * @param _in {number | null} * @returns {Promise} diff --git a/v3/internal/parser/testdata/struct_literal_single/frontend/bindings/main/GreetService.name.js b/v3/internal/parser/testdata/struct_literal_single/frontend/bindings/main/GreetService.name.js index 9982bea9a69..026bc3be501 100644 --- a/v3/internal/parser/testdata/struct_literal_single/frontend/bindings/main/GreetService.name.js +++ b/v3/internal/parser/testdata/struct_literal_single/frontend/bindings/main/GreetService.name.js @@ -7,7 +7,7 @@ import {Call} from '@wailsio/runtime'; * @typedef {import('./models').Person} Person */ -/** +/** * @function ArrayInt * @param _in {number[]} * @returns {Promise} @@ -16,7 +16,7 @@ export async function ArrayInt(_in) { return Call.ByName("main.GreetService.ArrayInt", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function BoolInBoolOut * @param _in {boolean} * @returns {Promise} @@ -25,7 +25,7 @@ export async function BoolInBoolOut(_in) { return Call.ByName("main.GreetService.BoolInBoolOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Float32InFloat32Out * @param _in {number} * @returns {Promise} @@ -34,7 +34,7 @@ export async function Float32InFloat32Out(_in) { return Call.ByName("main.GreetService.Float32InFloat32Out", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Float64InFloat64Out * @param _in {number} * @returns {Promise} @@ -44,7 +44,7 @@ export async function Float64InFloat64Out(_in) { } /** - * Greet someone + * Greet someone * @function Greet * @param name {string} * @returns {Promise} @@ -53,7 +53,7 @@ export async function Greet(name) { return Call.ByName("main.GreetService.Greet", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Int16InIntOut * @param _in {number} * @returns {Promise} @@ -62,7 +62,7 @@ export async function Int16InIntOut(_in) { return Call.ByName("main.GreetService.Int16InIntOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Int16PointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -71,7 +71,7 @@ export async function Int16PointerInAndOutput(_in) { return Call.ByName("main.GreetService.Int16PointerInAndOutput", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Int32InIntOut * @param _in {number} * @returns {Promise} @@ -80,7 +80,7 @@ export async function Int32InIntOut(_in) { return Call.ByName("main.GreetService.Int32InIntOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Int32PointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -89,7 +89,7 @@ export async function Int32PointerInAndOutput(_in) { return Call.ByName("main.GreetService.Int32PointerInAndOutput", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Int64InIntOut * @param _in {number} * @returns {Promise} @@ -98,7 +98,7 @@ export async function Int64InIntOut(_in) { return Call.ByName("main.GreetService.Int64InIntOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Int64PointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -107,7 +107,7 @@ export async function Int64PointerInAndOutput(_in) { return Call.ByName("main.GreetService.Int64PointerInAndOutput", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Int8InIntOut * @param _in {number} * @returns {Promise} @@ -116,7 +116,7 @@ export async function Int8InIntOut(_in) { return Call.ByName("main.GreetService.Int8InIntOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function Int8PointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -125,7 +125,7 @@ export async function Int8PointerInAndOutput(_in) { return Call.ByName("main.GreetService.Int8PointerInAndOutput", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function IntInIntOut * @param _in {number} * @returns {Promise} @@ -134,7 +134,7 @@ export async function IntInIntOut(_in) { return Call.ByName("main.GreetService.IntInIntOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function IntPointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -143,7 +143,7 @@ export async function IntPointerInAndOutput(_in) { return Call.ByName("main.GreetService.IntPointerInAndOutput", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function IntPointerInputNamedOutputs * @param _in {number | null} * @returns {Promise} @@ -152,7 +152,7 @@ export async function IntPointerInputNamedOutputs(_in) { return Call.ByName("main.GreetService.IntPointerInputNamedOutputs", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function MapIntInt * @param _in {map} * @returns {Promise} @@ -161,7 +161,7 @@ export async function MapIntInt(_in) { return Call.ByName("main.GreetService.MapIntInt", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function MapIntPointerInt * @param _in {map} * @returns {Promise} @@ -170,7 +170,7 @@ export async function MapIntPointerInt(_in) { return Call.ByName("main.GreetService.MapIntPointerInt", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function MapIntSliceInt * @param _in {map} * @returns {Promise} @@ -179,7 +179,7 @@ export async function MapIntSliceInt(_in) { return Call.ByName("main.GreetService.MapIntSliceInt", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function MapIntSliceIntInMapIntSliceIntOut * @param _in {map} * @returns {Promise} @@ -188,7 +188,7 @@ export async function MapIntSliceIntInMapIntSliceIntOut(_in) { return Call.ByName("main.GreetService.MapIntSliceIntInMapIntSliceIntOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function NoInputsStringOut * @returns {Promise} **/ @@ -196,7 +196,7 @@ export async function NoInputsStringOut() { return Call.ByName("main.GreetService.NoInputsStringOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function PointerBoolInBoolOut * @param _in {boolean | null} * @returns {Promise} @@ -205,7 +205,7 @@ export async function PointerBoolInBoolOut(_in) { return Call.ByName("main.GreetService.PointerBoolInBoolOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function PointerFloat32InFloat32Out * @param _in {number | null} * @returns {Promise} @@ -214,7 +214,7 @@ export async function PointerFloat32InFloat32Out(_in) { return Call.ByName("main.GreetService.PointerFloat32InFloat32Out", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function PointerFloat64InFloat64Out * @param _in {number | null} * @returns {Promise} @@ -223,7 +223,7 @@ export async function PointerFloat64InFloat64Out(_in) { return Call.ByName("main.GreetService.PointerFloat64InFloat64Out", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function PointerMapIntInt * @param _in {map | null} * @returns {Promise} @@ -232,7 +232,7 @@ export async function PointerMapIntInt(_in) { return Call.ByName("main.GreetService.PointerMapIntInt", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function PointerStringInStringOut * @param _in {string | null} * @returns {Promise} @@ -241,7 +241,7 @@ export async function PointerStringInStringOut(_in) { return Call.ByName("main.GreetService.PointerStringInStringOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function StringArrayInputNamedOutput * @param _in {string[]} * @returns {Promise} @@ -250,7 +250,7 @@ export async function StringArrayInputNamedOutput(_in) { return Call.ByName("main.GreetService.StringArrayInputNamedOutput", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function StringArrayInputNamedOutputs * @param _in {string[]} * @returns {Promise} @@ -259,7 +259,7 @@ export async function StringArrayInputNamedOutputs(_in) { return Call.ByName("main.GreetService.StringArrayInputNamedOutputs", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function StringArrayInputStringArrayOut * @param _in {string[]} * @returns {Promise} @@ -268,7 +268,7 @@ export async function StringArrayInputStringArrayOut(_in) { return Call.ByName("main.GreetService.StringArrayInputStringArrayOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function StringArrayInputStringOut * @param _in {string[]} * @returns {Promise} @@ -277,7 +277,7 @@ export async function StringArrayInputStringOut(_in) { return Call.ByName("main.GreetService.StringArrayInputStringOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function StructInputStructOutput * @param _in {Person} * @returns {Promise} @@ -286,7 +286,7 @@ export async function StructInputStructOutput(_in) { return Call.ByName("main.GreetService.StructInputStructOutput", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function StructPointerInputErrorOutput * @param _in {Person | null} * @returns {Promise} @@ -295,7 +295,7 @@ export async function StructPointerInputErrorOutput(_in) { return Call.ByName("main.GreetService.StructPointerInputErrorOutput", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function StructPointerInputStructPointerOutput * @param _in {Person | null} * @returns {Promise} @@ -304,7 +304,7 @@ export async function StructPointerInputStructPointerOutput(_in) { return Call.ByName("main.GreetService.StructPointerInputStructPointerOutput", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UInt16InUIntOut * @param _in {number} * @returns {Promise} @@ -313,7 +313,7 @@ export async function UInt16InUIntOut(_in) { return Call.ByName("main.GreetService.UInt16InUIntOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UInt16PointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -322,7 +322,7 @@ export async function UInt16PointerInAndOutput(_in) { return Call.ByName("main.GreetService.UInt16PointerInAndOutput", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UInt32InUIntOut * @param _in {number} * @returns {Promise} @@ -331,7 +331,7 @@ export async function UInt32InUIntOut(_in) { return Call.ByName("main.GreetService.UInt32InUIntOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UInt32PointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -340,7 +340,7 @@ export async function UInt32PointerInAndOutput(_in) { return Call.ByName("main.GreetService.UInt32PointerInAndOutput", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UInt64InUIntOut * @param _in {number} * @returns {Promise} @@ -349,7 +349,7 @@ export async function UInt64InUIntOut(_in) { return Call.ByName("main.GreetService.UInt64InUIntOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UInt64PointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -358,7 +358,7 @@ export async function UInt64PointerInAndOutput(_in) { return Call.ByName("main.GreetService.UInt64PointerInAndOutput", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UInt8InUIntOut * @param _in {number} * @returns {Promise} @@ -367,7 +367,7 @@ export async function UInt8InUIntOut(_in) { return Call.ByName("main.GreetService.UInt8InUIntOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UInt8PointerInAndOutput * @param _in {number | null} * @returns {Promise} @@ -376,7 +376,7 @@ export async function UInt8PointerInAndOutput(_in) { return Call.ByName("main.GreetService.UInt8PointerInAndOutput", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UIntInUIntOut * @param _in {number} * @returns {Promise} @@ -385,7 +385,7 @@ export async function UIntInUIntOut(_in) { return Call.ByName("main.GreetService.UIntInUIntOut", ...Array.prototype.slice.call(arguments, 0)); } -/** +/** * @function UIntPointerInAndOutput * @param _in {number | null} * @returns {Promise} diff --git a/v3/internal/parser/testdata/variable_single/frontend/bindings/main/GreetService.js b/v3/internal/parser/testdata/variable_single/frontend/bindings/main/GreetService.js index 6e4ed88f979..993cfb9dcc1 100644 --- a/v3/internal/parser/testdata/variable_single/frontend/bindings/main/GreetService.js +++ b/v3/internal/parser/testdata/variable_single/frontend/bindings/main/GreetService.js @@ -5,7 +5,7 @@ import {Call} from '@wailsio/runtime'; /** - * Greet someone + * Greet someone * @function Greet * @param name {string} * @returns {Promise} diff --git a/v3/internal/parser/testdata/variable_single/frontend/bindings/main/GreetService.name.js b/v3/internal/parser/testdata/variable_single/frontend/bindings/main/GreetService.name.js index 020458d0bb3..66dfb05eebd 100644 --- a/v3/internal/parser/testdata/variable_single/frontend/bindings/main/GreetService.name.js +++ b/v3/internal/parser/testdata/variable_single/frontend/bindings/main/GreetService.name.js @@ -5,7 +5,7 @@ import {Call} from '@wailsio/runtime'; /** - * Greet someone + * Greet someone * @function Greet * @param name {string} * @returns {Promise} diff --git a/v3/internal/parser/testdata/variable_single_from_function/frontend/bindings/main/GreetService.js b/v3/internal/parser/testdata/variable_single_from_function/frontend/bindings/main/GreetService.js index 6e4ed88f979..993cfb9dcc1 100644 --- a/v3/internal/parser/testdata/variable_single_from_function/frontend/bindings/main/GreetService.js +++ b/v3/internal/parser/testdata/variable_single_from_function/frontend/bindings/main/GreetService.js @@ -5,7 +5,7 @@ import {Call} from '@wailsio/runtime'; /** - * Greet someone + * Greet someone * @function Greet * @param name {string} * @returns {Promise} diff --git a/v3/internal/parser/testdata/variable_single_from_function/frontend/bindings/main/GreetService.name.js b/v3/internal/parser/testdata/variable_single_from_function/frontend/bindings/main/GreetService.name.js index 020458d0bb3..66dfb05eebd 100644 --- a/v3/internal/parser/testdata/variable_single_from_function/frontend/bindings/main/GreetService.name.js +++ b/v3/internal/parser/testdata/variable_single_from_function/frontend/bindings/main/GreetService.name.js @@ -5,7 +5,7 @@ import {Call} from '@wailsio/runtime'; /** - * Greet someone + * Greet someone * @function Greet * @param name {string} * @returns {Promise} diff --git a/v3/internal/parser/testdata/variable_single_from_other_function/frontend/bindings/main/GreetService.js b/v3/internal/parser/testdata/variable_single_from_other_function/frontend/bindings/main/GreetService.js index 7d9510b20ed..f1343c2d7b7 100644 --- a/v3/internal/parser/testdata/variable_single_from_other_function/frontend/bindings/main/GreetService.js +++ b/v3/internal/parser/testdata/variable_single_from_other_function/frontend/bindings/main/GreetService.js @@ -8,7 +8,7 @@ import {Call} from '@wailsio/runtime'; */ /** - * Greet does XYZ + * Greet does XYZ * @function Greet * @param name {string} * @returns {Promise} @@ -18,7 +18,7 @@ export async function Greet(name) { } /** - * NewPerson creates a new person + * NewPerson creates a new person * @function NewPerson * @param name {string} * @returns {Promise} diff --git a/v3/internal/parser/testdata/variable_single_from_other_function/frontend/bindings/main/GreetService.name.js b/v3/internal/parser/testdata/variable_single_from_other_function/frontend/bindings/main/GreetService.name.js index 38558e41c9c..30610a58aa1 100644 --- a/v3/internal/parser/testdata/variable_single_from_other_function/frontend/bindings/main/GreetService.name.js +++ b/v3/internal/parser/testdata/variable_single_from_other_function/frontend/bindings/main/GreetService.name.js @@ -8,7 +8,7 @@ import {Call} from '@wailsio/runtime'; */ /** - * Greet does XYZ + * Greet does XYZ * @function Greet * @param name {string} * @returns {Promise} @@ -18,7 +18,7 @@ export async function Greet(name) { } /** - * NewPerson creates a new person + * NewPerson creates a new person * @function NewPerson * @param name {string} * @returns {Promise} diff --git a/v3/internal/parser/testdata/variable_single_from_other_function/frontend/bindings/services/OtherService.js b/v3/internal/parser/testdata/variable_single_from_other_function/frontend/bindings/services/OtherService.js index 5729834914d..53004f53834 100644 --- a/v3/internal/parser/testdata/variable_single_from_other_function/frontend/bindings/services/OtherService.js +++ b/v3/internal/parser/testdata/variable_single_from_other_function/frontend/bindings/services/OtherService.js @@ -8,7 +8,7 @@ import {Call} from '@wailsio/runtime'; */ /** - * Yay does this and that + * Yay does this and that * @function Yay * @returns {Promise
} **/ diff --git a/v3/internal/parser/testdata/variable_single_from_other_function/frontend/bindings/services/OtherService.name.js b/v3/internal/parser/testdata/variable_single_from_other_function/frontend/bindings/services/OtherService.name.js index 4d3d71c5b4a..10240b9a676 100644 --- a/v3/internal/parser/testdata/variable_single_from_other_function/frontend/bindings/services/OtherService.name.js +++ b/v3/internal/parser/testdata/variable_single_from_other_function/frontend/bindings/services/OtherService.name.js @@ -8,7 +8,7 @@ import {Call} from '@wailsio/runtime'; */ /** - * Yay does this and that + * Yay does this and that * @function Yay * @returns {Promise
} **/