mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
Feature/v3 parser: expand TS model generation tests & some fixes (#2485)
* v3 parser: add tests for model generation * v3 parser: use single quotes for got model.ts * v3 parser: fixes for some failing tests * v3 parser: misc simplification and cleanup * v3 parser: fix model tests when no structs returned * v3 parser: fix last failing test case * Update contributors list * v3 parser: update README * Revert "Update contributors list" This reverts commit f429d2ba890020d7ff0772e6207830508261b489. * Changelog: add line about my contribution
This commit is contained in:
committed by
Lea Anthony
parent
b5f1eab59b
commit
130fab6c01
@@ -0,0 +1,51 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
export namespace main {
|
||||
|
||||
export class Person {
|
||||
name: string;
|
||||
address: services.Address;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new Person(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) {
|
||||
source = JSON.parse(source);
|
||||
}
|
||||
|
||||
this.name = source['name'];
|
||||
this.address = services.Address.createFrom(source['address']);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export namespace services {
|
||||
|
||||
export class Address {
|
||||
street: string;
|
||||
state: string;
|
||||
country: string;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new Address(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) {
|
||||
source = JSON.parse(source);
|
||||
}
|
||||
|
||||
this.street = source['street'];
|
||||
this.state = source['state'];
|
||||
this.country = source['country'];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user