5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 18:10:48 +08:00
wails/v2/internal/binding
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
..
binding_test Fix miscellaneous bindings and typescript export bugs (#3978) 2025-01-13 20:14:54 +11:00
binding.go Fix miscellaneous bindings and typescript export bugs (#3978) 2025-01-13 20:14:54 +11:00
boundMethod.go [chore] lint fixes 2023-11-12 12:30:49 +11:00
db.go fix obfuscated build binding ordering (#3071) 2023-11-26 07:16:24 +11:00
generate_test.go Fix miscellaneous bindings and typescript export bugs (#3978) 2025-01-13 20:14:54 +11:00
generate.go Fix miscellaneous bindings and typescript export bugs (#3978) 2025-01-13 20:14:54 +11:00
parameter.go Merge commit 'a213e8bcd1d8e4e5c764978879d875d2d55dd400' as 'v2' 2020-09-15 19:52:54 -05:00
reflect.go Fix miscellaneous bindings and typescript export bugs (#3978) 2025-01-13 20:14:54 +11:00