pendulum-chain / api-solang

This is the code for the npm package @pendulum-chain/api-solang
0 stars 0 forks source link

Add skipDryRunning flag #12

Closed TorstenStueber closed 3 months ago

TorstenStueber commented 3 months ago

Closes #11

Unfortunately I had to change the return type of the affected functions and make the result entry optional. It is only undefined if the parameter skipDryRunning is true, otherwise it will always be defined – as before.

It is possible to define this relationship in TypeScript but I think that the types will be ugly. Therefore I keep it as it is. This would now require the caller to explicitly check whether the result entry is undefined or not (or just assure it using the ! operator).