`__makeEvents__` defined but it's value is never read
Closed this issue · 2 comments
Description
I have no defined events in the backend, so __makeEvents__
is not used.
The problem is that when building the application with tsc
it fails throwing the following:
Desired solution
Adding a // @ts-nocheck
at the top of the generated file will be sufficient, and even maybe add eslint ignore comments as well.
Environment info
- tauri-specta: 2.0.0-rc.5
- tsc: 5.4.2
Given we can't account for all different configurations and tools we allow the user to define their own header for the file.
You can do the following:
let builder = ts::builder()
.commands(...)
.header("// @ts-nocheck\n"); // <- This this appended to the start of the file
As of the current release you will need a \n
to ensure it doesn't end up on the same line as the first line of Tauri Specta's runtime however I have fixed that for the next release.
I've also added a section to the v2 docs because it was definitely unclear how to solve this before.