{
  "version": 3,
  "sources": ["../../../src/utility-hooks/use-callback-ref.ts"],
  "sourcesContent": ["import type { DependencyList } from 'react';\nimport React, { useRef } from 'react';\n\nconst noDeps: DependencyList = Object.freeze([]);\n\n/** Creates a wrapper function that can be updated on each render without updating the resulting function */\nexport const useCallbackRef = <ArgsT extends any[], ReturnT>(func: (...args: ArgsT) => ReturnT) => {\n  const latest = useRef<(...args: ArgsT) => ReturnT>(func);\n  latest.current = func;\n\n  // eslint-disable-next-line react-hooks/exhaustive-deps\n  const caller = React.useCallback((...args: ArgsT): ReturnT => latest.current(...args), noDeps);\n\n  return caller;\n};\n"],
  "mappings": "AACA,OAAO,SAAS,cAAc;AAE9B,MAAM,SAAyB,OAAO,OAAO,CAAC,CAAC;AAGxC,MAAM,iBAAiB,CAA+B,SAAsC;AACjG,QAAM,SAAS,OAAoC,IAAI;AACvD,SAAO,UAAU;AAGjB,QAAM,SAAS,MAAM,YAAY,IAAI,SAAyB,OAAO,QAAQ,GAAG,IAAI,GAAG,MAAM;AAE7F,SAAO;AACT;",
  "names": []
}
