mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 09:00:38 +08:00
State no support for anonymous structs in binding. Fixes #1142
This commit is contained in:
parent
eb0f22b4ee
commit
00db626942
@ -216,7 +216,13 @@ is passed to it.
|
||||
|
||||
All data types are correctly translated between Go and Javascript. Even structs. If you return a struct from a Go call,
|
||||
it will be returned to your frontend as a Javascript map. Note: If you wish to use structs, you **must** define `json` struct
|
||||
tags for your fields! It is also possible to send structs back to Go. Any Javascript map passed as an argument that
|
||||
tags for your fields!
|
||||
|
||||
:::info Note
|
||||
Anonymous nested structs are not supported at this time.
|
||||
:::
|
||||
|
||||
It is also possible to send structs back to Go. Any Javascript map passed as an argument that
|
||||
is expecting a struct, will be converted to that struct type. To make this process a lot easier, in `dev` mode,
|
||||
a TypeScript module is generated, defining all the struct types used in bound methods. Using this module, it's possible
|
||||
to construct and send native Javascript objects to the Go code.
|
||||
|
Loading…
Reference in New Issue
Block a user