* 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>
* Do not attempt to export fields that cannot be json-encoded
* update changelog w/ PR
* also skip UnsafePointers
---------
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
* Update check for Array-like variables
* Updated binding tests to reflect changes
* Update documentation to reflect changes
* Fixed PR number in changelog
---------
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
* Add support to output ts models as interfaces
* Add support to generate enums from golang
* cleanup logs
* add missing documentation
* fix package names for enum. Fix processing enums that are in separate packages
* revert golang 1.21
* Fix spelling
* Add support for simplified version of Enum for typescriptify
* update docs
* removed unused logs
* Add tests. Fix imported enums types in models
---------
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
* include ts gen pref and suff in class fields
* fix nested namespaces not prefixed
* add basic unit test for parent child
* test for diff namespaces imports
* make entityReturn type func more generic
* get full entity name for TS args list
* fix failing test on empty struct
* wire up gen tests
* remove comment
* remove redundant line
* add tspostfix and tsprefix flags + organise under struct
* postifx -> suffix
* tsPrefix options on bindings struct
* pass prefix and suffix to the executable
* add support for CLI flags for generating module
* method to set TSpref/suff to bindings
* use passed ts prefix for typescriptify
* add brief Readme udpate to include new flags
* create reusable common flags
* use common flags instead of hardcoded text
* support tsprefix & suffix for dev
* add tsPrefix & tsSuffix for build cmd
* take pref & suff in account when gen d.ts
* export colorsful log functions into utils for reuse
* detect and warn the user about usage of reserved keyword
* fmt
* add TrimSpace on fn input
* refactor utils -> logutils
* add bindings -> ts_generation options to wailsjson parse
* use wailsjson for ts generation
* update warning message + extract to func
* remove suff/pref info from readme
* update json schema
* add tests for prefix and suffix case
* rename suffix method
* Update v2/internal/typescriptify/typescriptify.go
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
* Update website/static/schemas/config.v2.json
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
* Update website/static/schemas/config.v2.json
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
* update changelog
* Minor tweaks
Co-authored-by: Lea Anthony <lea.anthony@gmail.com>
* 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>