Files
NapCatQQ/.pnpm-store/v3/files/e3/6f71fc28ab7b1efe453eea3fe338f1fabc51325b48cebcabd80f03db65885650215fcef5c4da2212f121ddf94ae8e3a7754887accd5f71280e5fabbbb0fde9
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

21 lines
858 B
Plaintext

export interface Options<T> {
defaultSelected?: T[];
itemKey?: string | ((item: T) => React.Key);
}
declare function useSelections<T>(items: T[], options?: T[] | Options<T>): {
readonly selected: T[];
readonly noneSelected: boolean;
readonly allSelected: boolean;
readonly partiallySelected: boolean;
readonly setSelected: import("react").Dispatch<import("react").SetStateAction<T[]>>;
readonly isSelected: (item: T) => boolean;
readonly select: (this: unknown, item: T) => void;
readonly unSelect: (this: unknown, item: T) => void;
readonly toggle: (this: unknown, item: T) => void;
readonly selectAll: (this: unknown) => void;
readonly unSelectAll: (this: unknown) => void;
readonly clearAll: (this: unknown) => void;
readonly toggleAll: (this: unknown) => void;
};
export default useSelections;