| 12345678910111213141516171819202122232425262728293031323334353637 |
- // @ts-check
- // Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
- // This file is automatically generated. DO NOT EDIT
- /**
- * GreetService 是一个暴露给前端调用的示例服务。
- * 在 main.go 中通过 application.NewService(&GreetService{}) 注册后,
- * Wails 会自动为其生成 JS/TS 绑定(frontend/bindings 目录),
- * 前端即可像调用本地函数一样直接调用 Greet 方法(底层通过 IPC 桥接)。
- * @module
- */
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- // @ts-ignore: Unused imports
- import { Call as $Call, CancellablePromise as $CancellablePromise, Create as $Create } from "@wailsio/runtime";
- /**
- * Greet 返回对 name 的问候语。
- *
- * 调用链:前端 main.js 的 doGreet() → GreetService.Greet(name) → 本方法。
- * 前端调用示例:GreetService.Greet("张三") → 返回 "您好 张三!"
- * 参数与返回值由 Wails 自动完成 Go 与 JS 之间的序列化/反序列化。
- * @param {string} name
- * @returns {$CancellablePromise<string>}
- */
- export function Greet(name) {
- return $Call.ByID(1411160069, name);
- }
- /**
- * GreetMany 返回对一批 name 的问候语(示例方法,演示切片参数的绑定与序列化)。
- * @param {string[]} names
- * @returns {$CancellablePromise<string>}
- */
- export function GreetMany(names) {
- return $Call.ByID(1896900098, names);
- }
|