Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Structural conversion problem #3900

Open
107295472 opened this issue Nov 22, 2024 · 0 comments
Open

Structural conversion problem #3900

107295472 opened this issue Nov 22, 2024 · 0 comments
Labels
Bug Something isn't working

Comments

@107295472
Copy link

Description

type ListData[T interface{}] struct {
	Total     int64 `json:"Total"`
	TotalPage int64 `json:"TotalPage"`
	PageNum   int   `json:"PageNum"`
	List      T     `json:"List,omitempty"`
}

Such a structure is wrong when converted to ts

To Reproduce

D:\work\gowork\alctserver> wails dev -m 2024/11/22 10:57:02Wails CLI v2.9.2

• Generating bindings: 2024/11/22 10:57:11 KnownStructs: models.ListSearchReq pkg.ListData[[]*alctgo/model pkg.PageParams pkg.Res[alctgo/pkg.ListData[[]*alctgo/model.AlctDriverNew]] pkg.Res[string]
pkg.ListData[alctgo/model.AlctDriverNew]

Expected behaviour

wailsjs/go/main/App.d.ts(14,95): error TS1005: ']' expected.
wailsjs/go/models.ts(20,23): error TS1005: '{' expected.
wailsjs/go/models.ts(20,55): error TS1005: ';' expected.
wailsjs/go/models.ts(24,11): error TS1109: Expression expected.
wailsjs/go/models.ts(24,33): error TS1011: An element access expression should take an argument.
wailsjs/go/models.ts(26,6): error TS1128: Declaration or statement expected.
wailsjs/go/models.ts(26,30): error TS1005: ',' expected.
wailsjs/go/models.ts(26,42): error TS1005: ';' expected.

Screenshots

No response

Attempted Fixes

No response

System Details

# Wails
Version | v2.9.2

# System
┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
| OS           | Windows 10 IoT Enterprise LTSC 2021                                                              |
| Version      | 2009 (Build: 19044)                                                                              |
| ID           | 21H2                                                                                             |
| Go Version   | go1.21.11                                                                                        |
| Platform     | windows                                                                                          |
| Architecture | amd64                                                                                            |
| CPU          | Intel(R) Core(TM) i5-10400 CPU @ 2.90GHz                                                         |
| GPU 1        | OrayIddDriver Device (Shanghai Best Oray Information Technology Co., Ltd.) - Driver: 17.1.58.818 |
| GPU 2        | Intel(R) UHD Graphics 630 (Intel Corporation) - Driver: 31.0.101.2111                            |
| Memory       | 24GB                                                                                             |
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

# Dependencies
┌───────────────────────────────────────────────────────┐
| Dependency | Package Name | Status    | Version       |
| WebView2   | N/A          | Installed | 130.0.2849.80 |
| Nodejs     | N/A          | Installed | 20.15.0       |
| npm        | N/A          | Installed | 10.7.0        |
| *upx       | N/A          | Available |               |
| *nsis      | N/A          | Installed | v3.10         |
└─────────────── * - Optional Dependency ───────────────┘

Additional context

No response

@107295472 107295472 added the Bug Something isn't working label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant