Skip to content

Commit

Permalink
fix: added docs for isReadOnly function (FuelLabs#2564)
Browse files Browse the repository at this point in the history
* chore: added doc block for `isReadOnly` functions

* chore: changeset

---------

Co-authored-by: Anderson Arboleya <[email protected]>
  • Loading branch information
petertonysmith94 and arboleya authored Jun 21, 2024
1 parent 95d351b commit 0206568
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/strong-ducks-tie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@fuel-ts/program": patch
---

fix: added docs for `isReadOnly` function
5 changes: 5 additions & 0 deletions packages/program/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ export type CallConfig<T = unknown> = {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export interface InvokeFunction<TArgs extends Array<any> = Array<any>, TReturn = any> {
(...args: TArgs): FunctionInvocationScope<TArgs, TReturn>;
/**
* Checks if the function is read-only i.e. it only reads from storage, does not write to it.
*
* @returns True if the function is read-only or pure, false otherwise.
*/
isReadOnly: () => boolean;
}

Expand Down

0 comments on commit 0206568

Please sign in to comment.