Initial commit
This commit is contained in:
15
node_modules/use-callback-ref/dist/es2015/assignRef.d.ts
generated
vendored
Normal file
15
node_modules/use-callback-ref/dist/es2015/assignRef.d.ts
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
import { ReactRef } from './types';
|
||||
/**
|
||||
* Assigns a value for a given ref, no matter of the ref format
|
||||
* @param {RefObject} ref - a callback function or ref object
|
||||
* @param value - a new value
|
||||
*
|
||||
* @see https://github.com/theKashey/use-callback-ref#assignref
|
||||
* @example
|
||||
* const refObject = useRef();
|
||||
* const refFn = (ref) => {....}
|
||||
*
|
||||
* assignRef(refObject, "refValue");
|
||||
* assignRef(refFn, "refValue");
|
||||
*/
|
||||
export declare function assignRef<T>(ref: ReactRef<T>, value: T | null): ReactRef<T>;
|
||||
Reference in New Issue
Block a user