near / near-workspaces-js

Write tests once, run them both on NEAR TestNet and a controlled NEAR Sandbox local environment
https://near.github.io/near-workspaces-js/
GNU General Public License v3.0
42 stars 22 forks source link

feat: view always typecasts to user-specified type #81

Closed chadoh closed 2 years ago

chadoh commented 2 years ago

You had to do this before, for non-string return types:

const result = contract.view(…) as CustomType;

Now you do this:

const result: CustomType = contract.view(…);