js-algorand-sdk icon indicating copy to clipboard operation
js-algorand-sdk copied to clipboard

TypeScript modelsv2 interfaces are incorrect

Open joe-p opened this issue 3 years ago • 0 comments

Subject of the issue

I noticed that the TypeScript interface for algosdk.modelsv2.Account is incorrect. The interface uses camel-case keys (createdApps) but the actual object uses hyphenated keys (created-apps).

I haven't thoroughly looked (yet), but I assume this also affects some other algosdk.modelsv2 interfaces. I know for sure there are multiple incorrect keys for algosdk.modelsv2.Account

Your environment

This was seen with 1.13.1 but it appears to be the same in develop

Steps to reproduce

  1. Attempt to get createdApps parameter

Expected behaviour

Following the TypeScript interface (thus documentation/IntelliSense), you'd expect to the get the created apps for that account.

Actual behavior

createdApps property is always undefined

// @ts-ignore must be used followed by the usage of the created-apps key

What do we want the desired behavior to be? I assume we want the actual object to be transformed to use came-case keys to conform with common JavaScript practices.

joe-p avatar Mar 04 '22 02:03 joe-p