react-js-plugins
Version:
A powerful and efficient React utility library designed to enhance application performance by streamlining and simplifying the management of complex asynchronous operations.
29 lines (28 loc) • 865 B
TypeScript
export interface FormRef {
current: {
validateForm: () => Promise<Record<string, any>>;
} | null;
}
export type ValidationResult = {
isValid: boolean;
errors: Record<string, any> | [];
};
export type MenuItem = {
path?: string;
data?: MenuItem[];
[key: string]: any;
};
export type ReducerActionHandler<State, Action> = (state: State, action: Action) => State;
export type StorageType = 'local' | 'session';
export type StorageAction = 'SET' | 'GET' | 'REMOVE' | 'CLEAR';
export interface UseStorageParams {
action: StorageAction;
type: StorageType;
key: string;
value?: any;
}
export type FlattenedObject = {
[key: string]: any;
};
export type ClassDictionary = Record<string, boolean | null | undefined>;
export type ClassValue = string | number | ClassDictionary | ClassValue[] | null | undefined | false;