Skip to content

Commit

Permalink
Merge pull request #9 from smartweaver/crookse/fix/add-dry-run-return…
Browse files Browse the repository at this point in the history
…-type

fix: add dry run return type to prevent `any` return type in built lib
  • Loading branch information
crookse authored Aug 6, 2024
2 parents 629b7b1 + 0fe2f92 commit 195b076
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@smartweaver/slick-transaction",
"version": "0.0.12",
"versionBuildDate": "202340731.1624",
"version": "0.0.13",
"versionBuildDate": "20240805.2304",
"description": "Slick builder APIs for creating Arweave transactions",
"author": "Eric Crooks <eric.crooks.github@gmail.com> (https://crookse.com)",
"license": "GPL-3.0",
Expand Down
9 changes: 7 additions & 2 deletions src/modules/aoprocess/Process.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Client } from "../aoconnect/Client.ts";
import { AoConnect } from "../aoconnect/interfaces/AoConnect.ts";
import { DryRun } from "../aoconnect/units/compute/DryRun.ts";

export class Process<Actions extends string = any> {
protected client: Client;
Expand Down Expand Up @@ -49,12 +50,16 @@ export class Process<Actions extends string = any> {
}

/**
* Get DryRun message request builder for the given action.
* Get the DryRun message request builder for the given action.
*
* This method sets `.tags({ Action: action })`, so if you call `.tags()` and
* overwrite the `Action` tag, then this DryRun message request will use the
* `Action` you passed in.
*
* @param action The name of the action to build the DryRun message for.
* @returns The DryRun message builder - predefined with this process' ID.
*/
dryRun(action: Actions) {
dryRun(action: Actions): DryRun {
return this.client
.cu()
.dryRun()
Expand Down

0 comments on commit 195b076

Please sign in to comment.