Skip to content

Commit

Permalink
added useCallback typings; first stable version 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wpdas committed May 2, 2024
1 parent 752b59d commit 748cbda
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions lib/alem-vm/alem-vm.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,20 @@ export declare function useEffect(
deps?: DependencyList,
): void;

/**
* `useMemo` will only recompute the memoized value when one of the `deps` has changed.
*/
export declare function useMemo<T>(factory: () => T, deps: DependencyList): T;

/**
* `useCallback` will return a memoized version of the callback that only changes if one of the `inputs`
* has changed.
*/
export declare function useCallback<T extends Function>(
callback: T,
deps: DependencyList,
): T;

type FetchOptions = {
responseType?:
| "arraybuffer"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "alem",
"description": "Create web3 applications for NEAR BOS with a focus on performance and friendly development.",
"version": "1.0.0-beta.35",
"version": "1.0.0",
"main": "main.js",
"types": "index.d.ts",
"author": "Wenderson Pires - wendersonpires.near",
Expand Down

0 comments on commit 748cbda

Please sign in to comment.