github.com/AlpineAIO/wails/v2@v2.0.0-beta.32.0.20240505041856-1047a8fa5fef/internal/binding/binding_test/binding_escapedname_test.go (about) 1 package binding_test 2 3 type EscapedName struct { 4 Name string `json:"n.a.m.e"` 5 } 6 7 func (s EscapedName) Get() EscapedName { 8 return s 9 } 10 11 var EscapedNameTest = BindingTest{ 12 name: "EscapedName", 13 structs: []interface{}{ 14 &EscapedName{}, 15 }, 16 exemptions: nil, 17 shouldError: false, 18 want: ` 19 export namespace binding_test { 20 export class EscapedName { 21 "n.a.m.e": string; 22 static createFrom(source: any = {}) { 23 return new EscapedName(source); 24 } 25 constructor(source: any = {}) { 26 if ('string' === typeof source) source = JSON.parse(source); 27 this["n.a.m.e"] = source["n.a.m.e"]; 28 } 29 } 30 } 31 `, 32 }