Description
I’m running into an issue with strongly typed custom events in Wails3 and wanted to check whether this is expected behavior, a documentation mismatch, or a bug in the generator.
My test environment: wails3 -n aNameForThisTestProject -t react
This is a freshly generated standard template project, with no custom generation setup beyond the template defaults
To Reproduce
wails3 init -n aNameForThisTestProject -t vanilla or wails3 init -n aNameForThisTestProject -t react
- enter the project, and add some custom events (using examples from wails3 doc here):
func init() {
application.RegisterEvent[string]("time")
application.RegisterEvent[UserLoginData]("user:login")
application.RegisterEvent[MonitorStats]("monitor:stats")
application.RegisterEvent[application.Void]("app:ready")
}
Expected behaviour
According to the Wails v3 documentation for custom events:
https://v3.wails.io/guides/events-reference/#registering-custom-events
I expected Wails to generate a frontend bindings/events folder or equivalent typed event files for the registered events, so typed events can be easily import like this:
import { UserLogin, MonitorStats } from './bindings/events'
But there is no events folder was generated under the frontend bindings. I can only find events definations in frontend/bindings/github.com/wailsapp/wails/v3/internal/eventdata.d.ts.
In this template, the wails vite plugin will handle these events automantically. But in non-vite project, i have to reference it manually to provide events definations to ts language server. Is the current generation behavior as expected?
Screenshots
No response
Attempted Fixes
System Details
$ wails3 doctor
Wails v3.0.0-alpha2.105 › Wails Doctor
# System
┌──────────────────────────────────────────────────────────────────────────┐
| Name | Windows 10 Pro |
| Version | 2009 (Build: 26200) |
| ID | 25H2 |
| Branding | Windows 11 专业版 |
| Platform | windows |
| Architecture | amd64 |
| Go WebView2Loader | true |
| WebView2 Version | 149.0.4022.80 |
| CPU | AMD Ryzen 7 9800X3D 8-Core Processor |
| GPU | AMD Radeon RX 9070 XT (Advanced Micro Devices, Inc.) |
| Memory | 32GB |
└──────────────────────────────────────────────────────────────────────────┘
# Build Environment
┌─────────────────────────────────┐
| Wails CLI | v3.0.0-alpha2.105 |
| Go Version | go1.25.3 |
| -buildmode | exe |
| -compiler | gc |
| CGO_ENABLED | 0 |
| GOAMD64 | v1 |
| GOARCH | amd64 |
| GOOS | windows |
└─────────────────────────────────┘
# Dependencies
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
| *Android SDK | Not found. Set ANDROID_HOME (install via Android Studio or the command-line tools). |
| MSIX Packaging Tool | Not Installed |
| MakeAppx.exe (Windows SDK) | Not Installed |
| NSIS | Not Installed |
| SignTool.exe (Windows SDK) | Not Installed |
| npm | 11.6.2 |
| docker | *Not installed (optional - for cross-compilation) |
| |
└──────────────────────────────────────────── * - Optional Dependency ─────────────────────────────────────────────┘
# Signing
┌────────────────────────────────────────┐
| macOS Signing | Not configured |
| Windows Signing | Not configured |
| Linux Signing | Not configured (GPG) |
└────────────────────────────────────────┘
# Checking for issues
SUCCESS No issues found
# Diagnosis
SUCCESS Your system is ready for Wails development!
Need documentation? Run: wails3 docs
♥ If Wails is useful to you or your company, please consider sponsoring the project: wails3 sponsor
Additional context
I have already tried templates vanilla and react
I’d really appreciate any guidance on whether I’m using the feature incorrectly, or whether this is a mismatch between docs and the current generator output.
Description
I’m running into an issue with strongly typed custom events in Wails3 and wanted to check whether this is expected behavior, a documentation mismatch, or a bug in the generator.
My test environment:
wails3 -n aNameForThisTestProject -t reactThis is a freshly generated standard template project, with no custom generation setup beyond the template defaults
To Reproduce
wails3 init -n aNameForThisTestProject -t vanillaorwails3 init -n aNameForThisTestProject -t reactwails3 devExpected behaviour
According to the Wails v3 documentation for custom events:
https://v3.wails.io/guides/events-reference/#registering-custom-events
I expected Wails to generate a frontend bindings/events folder or equivalent typed event files for the registered events, so typed events can be easily import like this:
But there is no events folder was generated under the frontend bindings. I can only find events definations in
frontend/bindings/github.com/wailsapp/wails/v3/internal/eventdata.d.ts.In this template, the wails vite plugin will handle these events automantically. But in non-vite project, i have to reference it manually to provide events definations to ts language server. Is the current generation behavior as expected?
Screenshots
No response
Attempted Fixes
System Details
Additional context
I have already tried templates
vanillaandreactI’d really appreciate any guidance on whether I’m using the feature incorrectly, or whether this is a mismatch between docs and the current generator output.