Skip to content

Commit

Permalink
increased amigoJS version and improved some code
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmetilhn committed Aug 31, 2024
1 parent f59172e commit 3fbc4d2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ const functionCacheStore = new FunctionCacheStore();
const dependencyCacheStore = new DependencyCacheStore();
const argumentCacheStore = new ArgumentCacheStore();
export default function memofy<A extends Args, ReturnType>(
_functionToMemoize: Function,
_functionToMemoize: (...args: Array<unknown>) => ReturnType,
_deps: Deps = []
): MemoizedFunction<A, ReturnType> {
return (...args: A): ReturnType => {
// IF IT HAVE CACHE
try {
// IF IT HAVE CACHE
if (
functionCacheStore.isHasCache(_functionToMemoize) &&
!dependencyCacheStore.isChanged(_functionToMemoize, _deps)
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@
"tslib": "^2.7.0"
},
"peerDependencies": {
"amigo-js": "^2.0.3"
"amigo-js": "^2.1.1"
}
}

0 comments on commit 3fbc4d2

Please sign in to comment.