5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 06:50:22 +08:00
wails/v3/examples/binding/bindings_main.js
Lea Anthony 26530a0f5a Fix reserve word check.
Add model generation.
Warn if field is unexported in the Go struct
2023-03-07 19:48:30 +11:00

44 lines
842 B
JavaScript

// @ts-check
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
import {main} from './models';
function GreetService(method) {
return {
packageName: "main",
serviceName: "GreetService",
methodName: method,
args: Array.prototype.slice.call(arguments, 1),
};
}
/**
* GreetService.Greet
*
* @param name {string}
* @returns {Promise<string>}
**/
function Greet(name) {
return wails.Call(GreetService("Greet", name));
}
/**
* GreetService.GreetPerson
*
* @param person {main.Person}
* @returns {Promise<string>}
**/
function GreetPerson(person) {
return wails.Call(GreetService("GreetPerson", person));
}
window.go = window.go || {};
window.go.main = {
GreetService: {
Greet,
GreetPerson,
},
};