@clopezochoa/detect-autofill-react
Version:
React hook to detect browser's autofill
12 lines (11 loc) • 415 B
TypeScript
export interface ISubscription {
unsubscribe(): void;
}
export interface ISubject<T> {
subscribe(callback: (value: T) => void): ISubscription;
next(value: T): void;
}
export declare const useAutofillDetectionRef: (element: HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement | null) => {
autofillStatusRef: import('react').RefObject<boolean>;
autofillStatusSubject: ISubject<boolean>;
};