mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
[runtime] Add cancelation of bound method calls and context passing
This commit is contained in:
+10
@@ -13,3 +13,13 @@ import {Call} from '@wailsio/runtime';
|
||||
export async function Greet(name) {
|
||||
return Call.ByID(1411160069, ...Array.prototype.slice.call(arguments, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* Greet someone
|
||||
* @function GreetWithContext
|
||||
* @param name {string}
|
||||
* @returns {Promise<string>}
|
||||
**/
|
||||
export async function GreetWithContext(name) {
|
||||
return Call.ByID(1310150960, ...Array.prototype.slice.call(arguments, 0));
|
||||
}
|
||||
|
||||
+10
@@ -13,3 +13,13 @@ import {Call} from '@wailsio/runtime';
|
||||
export async function Greet(name) {
|
||||
return Call.ByName("main.GreetService.Greet", ...Array.prototype.slice.call(arguments, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* Greet someone
|
||||
* @function GreetWithContext
|
||||
* @param name {string}
|
||||
* @returns {Promise<string>}
|
||||
**/
|
||||
export async function GreetWithContext(name) {
|
||||
return Call.ByName("main.GreetService.GreetWithContext", ...Array.prototype.slice.call(arguments, 0));
|
||||
}
|
||||
|
||||
+5
@@ -7,3 +7,8 @@ export async function Greet(name: string) : Promise<string> {
|
||||
return Call.ByName("main.GreetService.Greet", name);
|
||||
}
|
||||
|
||||
// Greet someone
|
||||
export async function GreetWithContext(name: string) : Promise<string> {
|
||||
return Call.ByName("main.GreetService.GreetWithContext", name);
|
||||
}
|
||||
|
||||
|
||||
+5
@@ -7,3 +7,8 @@ export async function Greet(name: string) : Promise<string> {
|
||||
return Call.ByID(1411160069, name);
|
||||
}
|
||||
|
||||
// Greet someone
|
||||
export async function GreetWithContext(name: string) : Promise<string> {
|
||||
return Call.ByID(1310150960, name);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user