mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
Update bindings generator to generate bindings in packages and files.
Remove unused JavaScript files Update tests. Update v3 docs
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
/**
|
||||
* @typedef {import('./models').main.Title} mainTitle
|
||||
* @typedef {import('./models').main.Person} mainPerson
|
||||
*/
|
||||
|
||||
export const GreetService = {
|
||||
|
||||
/**
|
||||
* GreetService.Greet
|
||||
* Greet does XYZ
|
||||
* @param name {string}
|
||||
* @param title {mainTitle}
|
||||
* @returns {Promise<string>}
|
||||
**/
|
||||
Greet: function(name, title) { return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.NewPerson
|
||||
* NewPerson creates a new person
|
||||
* @param name {string}
|
||||
* @returns {Promise<mainPerson>}
|
||||
**/
|
||||
NewPerson: function(name) { return wails.CallByID(1661412647, ...Array.prototype.slice.call(arguments, 0)); },
|
||||
};
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
/**
|
||||
* @typedef {import('./models').main.Title} mainTitle
|
||||
* @typedef {import('./models').main.Person} mainPerson
|
||||
*/
|
||||
|
||||
export const GreetService = {
|
||||
|
||||
/**
|
||||
* GreetService.Greet
|
||||
* Greet does XYZ
|
||||
* @param name {string}
|
||||
* @param title {mainTitle}
|
||||
* @returns {Promise<string>}
|
||||
**/
|
||||
Greet: function(name, title) { return wails.CallByName("main.GreetService.Greet", ...Array.prototype.slice.call(arguments, 0)); },
|
||||
|
||||
/**
|
||||
* GreetService.NewPerson
|
||||
* NewPerson creates a new person
|
||||
* @param name {string}
|
||||
* @returns {Promise<mainPerson>}
|
||||
**/
|
||||
NewPerson: function(name) { return wails.CallByName("main.GreetService.NewPerson", ...Array.prototype.slice.call(arguments, 0)); },
|
||||
};
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
/**
|
||||
* @typedef {import('./models').Person} Person
|
||||
* @typedef {import('./models').Title} Title
|
||||
*/
|
||||
|
||||
/**
|
||||
* Greet does XYZ
|
||||
* @function Greet
|
||||
* @param name {string}
|
||||
* @param title {Title}
|
||||
* @returns {Promise<string>}
|
||||
**/
|
||||
export function Greet(name, title) {
|
||||
return wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* NewPerson creates a new person
|
||||
* @function NewPerson
|
||||
* @param name {string}
|
||||
* @returns {Promise<Person>}
|
||||
**/
|
||||
export function NewPerson(name) {
|
||||
return wails.CallByID(1661412647, ...Array.prototype.slice.call(arguments, 0));
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
/**
|
||||
* @typedef {import('./models').Person} Person
|
||||
* @typedef {import('./models').Title} Title
|
||||
*/
|
||||
|
||||
/**
|
||||
* Greet does XYZ
|
||||
* @function Greet
|
||||
* @param name {string}
|
||||
* @param title {Title}
|
||||
* @returns {Promise<string>}
|
||||
**/
|
||||
export function Greet(name, title) {
|
||||
return wails.CallByName("main.GreetService.Greet", ...Array.prototype.slice.call(arguments, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* NewPerson creates a new person
|
||||
* @function NewPerson
|
||||
* @param name {string}
|
||||
* @returns {Promise<Person>}
|
||||
**/
|
||||
export function NewPerson(name) {
|
||||
return wails.CallByName("main.GreetService.NewPerson", ...Array.prototype.slice.call(arguments, 0));
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
// Title is a title
|
||||
export enum Title {
|
||||
// Mister is a title
|
||||
Mister = "Mr",
|
||||
Miss = "Miss",
|
||||
Ms = "Ms",
|
||||
Mrs = "Mrs",
|
||||
Dr = "Dr",
|
||||
}
|
||||
|
||||
// Person represents a person
|
||||
export interface Person {
|
||||
title: Title;
|
||||
name: string;
|
||||
}
|
||||
+9
-10
@@ -2,11 +2,8 @@
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
// Defining the main namespace
|
||||
export const main = {};
|
||||
|
||||
// Simulating the enum with an object
|
||||
main.Title = {
|
||||
// Title is a title
|
||||
export const Title = {
|
||||
// Mister is a title
|
||||
Mister: "Mr",
|
||||
Miss: "Miss",
|
||||
@@ -14,12 +11,14 @@ main.Title = {
|
||||
Mrs: "Mrs",
|
||||
Dr: "Dr",
|
||||
};
|
||||
main.Person = class {
|
||||
|
||||
// Person represents a person
|
||||
export const Person = class {
|
||||
/**
|
||||
* Creates a new Person instance.
|
||||
* @constructor
|
||||
* @param {Object} source - The source object to create the Person.
|
||||
* @param {main.Title} source.Title
|
||||
* @param {Title} source.Title
|
||||
* @param {string} source.Name
|
||||
*/
|
||||
constructor(source = {}) {
|
||||
@@ -31,11 +30,11 @@ main.Person = class {
|
||||
/**
|
||||
* Creates a new Person instance from a string or object.
|
||||
* @param {string|object} source - The source data to create a Person instance from.
|
||||
* @returns main.Person A new Person instance.
|
||||
* @returns {Person} A new Person instance.
|
||||
*/
|
||||
static createFrom(source = {}) {
|
||||
static createFrom(source) {
|
||||
let parsedSource = typeof source === 'string' ? JSON.parse(source) : source;
|
||||
return new main.Person(parsedSource);
|
||||
return new Person(parsedSource);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
// Title is a title
|
||||
export enum Title {
|
||||
// Mister is a title
|
||||
Mister = "Mr",
|
||||
Miss = "Miss",
|
||||
Ms = "Ms",
|
||||
Mrs = "Mrs",
|
||||
Dr = "Dr",
|
||||
}
|
||||
|
||||
// Person represents a person
|
||||
export class Person {
|
||||
title: Title;
|
||||
name: string;
|
||||
|
||||
constructor(source: Partial<Person> = {}) {
|
||||
const {title = null, name = ""} = source;
|
||||
this.title = title;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
static createFrom(source: string | object = {}): Person {
|
||||
let parsedSource = typeof source === 'string' ? JSON.parse(source) : source;
|
||||
return new Person(parsedSource as Partial<Person>);
|
||||
}
|
||||
}
|
||||
+1
@@ -7,6 +7,7 @@ import (
|
||||
"github.com/wailsapp/wails/v3/pkg/application"
|
||||
)
|
||||
|
||||
// Title is a title
|
||||
type Title string
|
||||
|
||||
const (
|
||||
|
||||
-33
@@ -1,33 +0,0 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
export namespace main {
|
||||
|
||||
export enum Title {
|
||||
// Mister is a title
|
||||
Mister = "Mr",
|
||||
Miss = "Miss",
|
||||
Ms = "Ms",
|
||||
Mrs = "Mrs",
|
||||
Dr = "Dr",
|
||||
}
|
||||
|
||||
export class Person {
|
||||
title: Title;
|
||||
name: string;
|
||||
|
||||
constructor(source: Partial<Person> = {}) {
|
||||
const { title = null, name = "" } = source;
|
||||
this.title = title;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
static createFrom(source: string | object = {}): Person {
|
||||
let parsedSource = typeof source === 'string' ? JSON.parse(source) : source;
|
||||
return new Person(parsedSource as Partial<Person>);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user