* Whether an attribute made this function a command. `generate_handler!` reads * what an attribute macro generates, so a plain function can't be registered: * a namesake of a list's entry that has none is some other function, the entry * being an external crate's. `#[tauri::command]` is on the no
(node: Node, ctx: ResolutionContext)
| 286 | * (GitButler's `#[but_api]`) are read from the lines above it. |
| 287 | */ |
| 288 | function isCommandFunction(node: Node, ctx: ResolutionContext): boolean { |
| 289 | return attributeNames(node, ctx).some((name) => !PLAIN_ATTRIBUTE.test(name)); |
| 290 | } |
| 291 | |
| 292 | /** The stricter reading, for a list nothing can be checked against: Tauri's own attribute. */ |
| 293 | function isDeclaredCommand(node: Node, ctx: ResolutionContext): boolean { |
no test coverage detected