@zubridge/electron
Version:
A streamlined state management library for Electron applications using Zustand.
16 lines (15 loc) • 719 B
text/typescript
import type { Handler } from '@zubridge/types';
/**
* Helper function to find a case-insensitive match in an object
*/
export declare function findCaseInsensitiveMatch<T>(obj: Record<string, T>, key: string): [string, T] | undefined;
/**
* Helper function to find a handler by nested path
* Example: "counter.increment" -> obj.counter.increment
*/
export declare function findNestedHandler<T>(obj: Record<string, any>, path: string): T | undefined;
/**
* Resolves a handler function from provided handlers using action type
* This handles both direct matches and nested path resolution
*/
export declare function resolveHandler(handlers: Record<string, Handler | any>, actionType: string): Handler | undefined;