pub fn build(path: impl AsRef<Path>) -> Result<(), Box<dyn Error>>
Expand description
Generates an invoke.d.ts
file declaring invoke
function values composed
of function names labeled with the tauri::command
attribute.
- path - The path to the directory where the
invoke.d.ts
file will be generated.
§Example
fn main() {
tauri_named_invoke::build("ui").unwrap();
}
The file will be generated at the following path:
project root
├── ui
│ └── invoke.d.ts
├── src
│ └── main.rs
└── Cargo.toml