UNPKG

sicua

Version:

A tool for analyzing project structure and dependencies

44 lines (43 loc) 1.57 kB
import ts from "typescript"; import { StoreDefinition } from "../../types"; export declare class StoreAnalysisUtils { /** * Detects store initialization patterns across different libraries */ static detectStoreInitialization(node: ts.CallExpression): { type: StoreDefinition["type"] | null; name: string | null; initializerNode: ts.Node | null; }; /** * Analyzes hook usage patterns across different state management libraries */ static analyzeHookUsage(node: ts.CallExpression): { type: "read" | "write" | "both" | null; hookType: StoreDefinition["type"] | null; accessor: ts.Node | null; }; /** * Analyzes state update patterns across different libraries */ static analyzeStateUpdate(node: ts.Node): { type: "direct" | "functional" | "action" | null; updatePattern: string | null; affectedProperties: string[]; }; /** * Determines if a hook follows common store hook naming patterns */ static isStoreHook(hookName: string, storeName: string): boolean; private static getStoreFunctionName; private static getStoreDeclarationName; private static getHookName; private static isZustandHook; private static extractAffectedProperties; private static extractUpdatePattern; private static findModifiedProperties; private static isActionDispatch; private static extractActionPattern; private static findActionAffectedProperties; private static findActionCreatorDefinition; }