5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 23:39:21 +08:00
Commit Graph

2 Commits

Author SHA1 Message Date
Jeremy Jay
c4fdfd6415
Fix miscellaneous bindings and typescript export bugs (#3978)
* Do not attempt to export fields that cannot be json-encoded

* update changelog w/ PR

* also skip UnsafePointers

* WIP to allow conversion from Go generic types to typescript

* support for non-primitive generics also :)

* fix generic types in parameters / return args

* fixes a namespacing bug when mapping to pointer to struct

* fixing invalid knownstructs

* found a place it mattered, pushing the star replacement to the generate side

* descend as much as necessary to find structs

caught these examples in http.Request.TLS:

PeerCertificates []*x509.Certificate
VerifiedChains [][]*x509.Certificate

* accidently reverted other fix

* switch syntax for typescript record outputs

prior syntax is primarily useful for naming keys
so not useful here, and this syntax avoids square
brackets in output which greatly simplifies
generation for Go generics

* better handle edge cases for nested arrays and slices

* lots o tests

* update changelog

---------

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2025-01-13 20:14:54 +11:00
JulioDRF
40e326a708
Fix binding generation special cases (#1902)
* Make binding.go easier to test

* Fix non-deterministic namespace order for bindings

* Add binding tests

* Fix nested import structs, non-string map keys, and escape invalid variable names

Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
2022-10-01 15:49:51 +10:00