import { useMemo } from 'react' ; const createMemo = < T extends ( ... args : any ) => any > ( fn ) => ( ... args ) => useMemo < ReturnType < T > > ( ( ) => fn ( ... args ) , args ) ; export default createMemo ;