5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-03 05:50:08 +08:00
wails/v2/internal/binding/binding_test/binding_structwithoutfields_test.go
2024-05-18 07:39:27 +10:00

35 lines
677 B
Go

package binding_test
type WithoutFields struct {
}
func (s WithoutFields) Get() WithoutFields {
return s
}
var WithoutFieldsTest = BindingTest{
name: "StructWithoutFields",
structs: []interface{}{
&WithoutFields{},
},
exemptions: nil,
shouldError: false,
want: `
export namespace binding_test {
export class WithoutFields {
static createFrom(source: any = {}) {
return new WithoutFields(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
}
}
}`,
}