fix: bindings for excel module

This commit is contained in:
2025-03-13 14:24:38 +07:00
parent 7ae38ccd78
commit a475be9cb2
14 changed files with 360 additions and 550 deletions

View File

@@ -1,4 +1,3 @@
// @ts-check
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT

View File

@@ -1,4 +1,3 @@
// @ts-check
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
@@ -7,37 +6,23 @@
import {Create as $Create} from "@wailsio/runtime";
export class Author {
/**
* Creates a new Author instance.
* @param {Partial<Author>} [$$source = {}] - The source object to create the Author.
*/
constructor($$source = {}) {
"Id": number;
"Name": string;
"Posts": Post[];
"Comments": Comment[];
/** Creates a new Author instance. */
constructor($$source: Partial<Author> = {}) {
if (!("Id" in $$source)) {
/**
* @member
* @type {number}
*/
this["Id"] = 0;
}
if (!("Name" in $$source)) {
/**
* @member
* @type {string}
*/
this["Name"] = "";
}
if (!("Posts" in $$source)) {
/**
* @member
* @type {Post[]}
*/
this["Posts"] = [];
}
if (!("Comments" in $$source)) {
/**
* @member
* @type {Comment[]}
*/
this["Comments"] = [];
}
@@ -46,10 +31,8 @@ export class Author {
/**
* Creates a new Author instance from a string or object.
* @param {any} [$$source = {}]
* @returns {Author}
*/
static createFrom($$source = {}) {
static createFrom($$source: any = {}): Author {
const $$createField2_0 = $$createType1;
const $$createField3_0 = $$createType3;
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
@@ -59,49 +42,32 @@ export class Author {
if ("Comments" in $$parsedSource) {
$$parsedSource["Comments"] = $$createField3_0($$parsedSource["Comments"]);
}
return new Author(/** @type {Partial<Author>} */($$parsedSource));
return new Author($$parsedSource as Partial<Author>);
}
}
export class Comment {
/**
* Creates a new Comment instance.
* @param {Partial<Comment>} [$$source = {}] - The source object to create the Comment.
*/
constructor($$source = {}) {
"Id": number;
"Text": string;
"AuthorId": number;
"Author": Author;
"Posts": Post[];
/** Creates a new Comment instance. */
constructor($$source: Partial<Comment> = {}) {
if (!("Id" in $$source)) {
/**
* @member
* @type {number}
*/
this["Id"] = 0;
}
if (!("Text" in $$source)) {
/**
* @member
* @type {string}
*/
this["Text"] = "";
}
if (!("AuthorId" in $$source)) {
/**
* @member
* @type {number}
*/
this["AuthorId"] = 0;
}
if (!("Author" in $$source)) {
/**
* @member
* @type {Author}
*/
this["Author"] = (new Author());
}
if (!("Posts" in $$source)) {
/**
* @member
* @type {Post[]}
*/
this["Posts"] = [];
}
@@ -110,10 +76,8 @@ export class Comment {
/**
* Creates a new Comment instance from a string or object.
* @param {any} [$$source = {}]
* @returns {Comment}
*/
static createFrom($$source = {}) {
static createFrom($$source: any = {}): Comment {
const $$createField3_0 = $$createType4;
const $$createField4_0 = $$createType1;
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
@@ -123,77 +87,48 @@ export class Comment {
if ("Posts" in $$parsedSource) {
$$parsedSource["Posts"] = $$createField4_0($$parsedSource["Posts"]);
}
return new Comment(/** @type {Partial<Comment>} */($$parsedSource));
return new Comment($$parsedSource as Partial<Comment>);
}
}
export class Post {
/**
* Creates a new Post instance.
* @param {Partial<Post>} [$$source = {}] - The source object to create the Post.
*/
constructor($$source = {}) {
"Id": number;
"Text": string;
"Deadline": number;
"CreatedAt": number;
"AuthorId": number;
"Author": Author;
"PostTypeId": number;
"PostType": PostType;
"Comments": Comment[];
/** Creates a new Post instance. */
constructor($$source: Partial<Post> = {}) {
if (!("Id" in $$source)) {
/**
* @member
* @type {number}
*/
this["Id"] = 0;
}
if (!("Text" in $$source)) {
/**
* @member
* @type {string}
*/
this["Text"] = "";
}
if (!("Deadline" in $$source)) {
/**
* @member
* @type {number}
*/
this["Deadline"] = 0;
}
if (!("CreatedAt" in $$source)) {
/**
* @member
* @type {number}
*/
this["CreatedAt"] = 0;
}
if (!("AuthorId" in $$source)) {
/**
* @member
* @type {number}
*/
this["AuthorId"] = 0;
}
if (!("Author" in $$source)) {
/**
* @member
* @type {Author}
*/
this["Author"] = (new Author());
}
if (!("PostTypeId" in $$source)) {
/**
* @member
* @type {number}
*/
this["PostTypeId"] = 0;
}
if (!("PostType" in $$source)) {
/**
* @member
* @type {PostType}
*/
this["PostType"] = (new PostType());
}
if (!("Comments" in $$source)) {
/**
* @member
* @type {Comment[]}
*/
this["Comments"] = [];
}
@@ -202,10 +137,8 @@ export class Post {
/**
* Creates a new Post instance from a string or object.
* @param {any} [$$source = {}]
* @returns {Post}
*/
static createFrom($$source = {}) {
static createFrom($$source: any = {}): Post {
const $$createField5_0 = $$createType4;
const $$createField7_0 = $$createType5;
const $$createField8_0 = $$createType3;
@@ -219,28 +152,20 @@ export class Post {
if ("Comments" in $$parsedSource) {
$$parsedSource["Comments"] = $$createField8_0($$parsedSource["Comments"]);
}
return new Post(/** @type {Partial<Post>} */($$parsedSource));
return new Post($$parsedSource as Partial<Post>);
}
}
export class PostType {
/**
* Creates a new PostType instance.
* @param {Partial<PostType>} [$$source = {}] - The source object to create the PostType.
*/
constructor($$source = {}) {
"Id": number;
"Name": string;
/** Creates a new PostType instance. */
constructor($$source: Partial<PostType> = {}) {
if (!("Id" in $$source)) {
/**
* @member
* @type {number}
*/
this["Id"] = 0;
}
if (!("Name" in $$source)) {
/**
* @member
* @type {string}
*/
this["Name"] = "";
}
@@ -249,12 +174,10 @@ export class PostType {
/**
* Creates a new PostType instance from a string or object.
* @param {any} [$$source = {}]
* @returns {PostType}
*/
static createFrom($$source = {}) {
static createFrom($$source: any = {}): PostType {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new PostType(/** @type {Partial<PostType>} */($$parsedSource));
return new PostType($$parsedSource as Partial<PostType>);
}
}