MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / isCommandFunction

Function isCommandFunction

src/resolution/tauri-synthesizer.ts:288–290  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

286 * (GitButler's `#[but_api]`) are read from the lines above it.
287 */
288function 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. */
293function isDeclaredCommand(node: Node, ctx: ResolutionContext): boolean {

Callers 1

commandsForFunction · 0.85

Calls 1

attributeNamesFunction · 0.85

Tested by

no test coverage detected