5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 19:31:20 +08:00
Commit Graph

3 Commits

Author SHA1 Message Date
Andrey Pshenkin
b9de31e38e
Add support for interface generation and enums (#3047)
* 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>
2023-11-26 06:50:49 +11:00
Valentin Trinqué
2a20049ea7
fix: Prevent type parsing to interfere with package name in typescript generation (#1942)
Before that fix:

The method...

```go
func (h *Handler) RespondToInteraction(interaction interactor.Interaction) {}
```

... would generate...

```ts
export function RespondToInteraction(arg1:number):Promise<Error>;
```

... because the `interaction` package starts with `int` and anything starting with `int` is interpreted as `number`.
2022-10-10 23:50:55 +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