5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-18 18:09:30 +08:00
wails/v3/examples/binding/assets/bindings/data/models.js
Fabio Massaioli 45b2681dfc
[v3] Fix binding generator output and import paths (#3334)
* Fix relative import path computation

* Fix models output path

* Add option to generate bindings using bundled runtime

* Update binding example

* Fix testdata

* Update changelog

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2024-03-22 21:18:04 +11:00

29 lines
883 B
JavaScript

// @ts-check
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
// Person holds someone's most important attributes
export const Person = class {
/**
* Creates a new Person instance.
* @constructor
* @param {Object} source - The source object to create the Person.
* @param {string} source.Name
*/
constructor(source = {}) {
const { name = "" } = source;
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);
}
};