@restart/hooks
Advanced tools
Comparing version 0.1.5 to 0.1.6
{ | ||
"name": "@restart/hooks", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "types": "index.d.ts", |
/// <reference types="react" /> | ||
declare function useCommittedRef<TValue>(value: TValue): React.RefObject<TValue>; | ||
declare function useCommittedRef<TValue>(value: TValue): React.MutableRefObject<TValue>; | ||
export default useCommittedRef; |
@@ -14,3 +14,5 @@ "use strict"; | ||
const ref = (0, _useCommittedRef.default)(fn); | ||
return (0, _react.useCallback)((...args) => ref.current(...args), [ref]); | ||
return (0, _react.useCallback)(function (...args) { | ||
return ref.current(...args); | ||
}, [ref]); | ||
} |
@@ -1,1 +0,3 @@ | ||
export default function useGlobalListener(event: string, listener: EventListener, capture?: boolean): void; | ||
declare type DocumentEventHandler<K extends keyof DocumentEventMap> = (this: Document, ev: DocumentEventMap[K]) => any; | ||
export default function useGlobalListener<K extends keyof DocumentEventMap>(event: K, listener: DocumentEventHandler<K>, capture?: boolean): void; | ||
export {}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7898
149