// @ts-check // 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 = { // Mister is a title Mister: "Mr", Miss: "Miss", Ms: "Ms", Mrs: "Mrs", Dr: "Dr", }; main.Person = class { /** * Creates a new Person instance. * @constructor * @param {Object} source - The source object to create the Person. * @param {main.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 main.Person A new Person instance. */ static createFrom(source = {}) { let parsedSource = typeof source === 'string' ? JSON.parse(source) : source; return new main.Person(parsedSource); } };