rooks
Version:
Essential React custom hooks ⚓ to super charge your components!
15 lines • 914 B
TypeScript
import type { MutableRefObject, Ref } from "react";
export type HTMLElementOrNull = HTMLElement | null;
export type RefElementOrNull<T> = T | null;
export type CallbackRef<T extends HTMLElement | null = HTMLElementOrNull> = (node: T) => void;
export type AnyRef<T extends HTMLElement | null = HTMLElementOrNull> = CallbackRef<T> | MutableRefObject<T>;
export type PossibleRef<T> = Ref<T> | undefined;
type Key = string | number | symbol;
export declare const isObject: (value: unknown) => value is Record<Key, unknown>;
export declare const isFunction: (value: unknown) => value is Function;
export declare const isString: (value: unknown) => value is string;
export declare const isBoolean: (value: unknown) => value is boolean;
export declare const isNumber: (value: unknown) => value is number;
export declare const isUndef: (value: unknown) => value is undefined;
export {};
//# sourceMappingURL=utils.d.ts.map