Update bindings generator to generate bindings in packages and files.

Remove unused JavaScript files
Update tests.
Update v3 docs
This commit is contained in:
Lea Anthony
2023-12-22 20:01:42 +11:00
parent cdf4bdd2ba
commit 2bb25b12ff
125 changed files with 4008 additions and 2158 deletions
@@ -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;
}
@@ -0,0 +1,40 @@
// @ts-check
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
// Title is a title
export const Title = {
// Mister is a title
Mister: "Mr",
Miss: "Miss",
Ms: "Ms",
Mrs: "Mrs",
Dr: "Dr",
};
// 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 {Title} source.Title
* @param {string} source.Name
*/
constructor(source = {}) {
const { title = null, name = "" } = source;
this.title = title;
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);
}
};
@@ -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>);
}
}