js-algorand-sdk
js-algorand-sdk copied to clipboard
TypeScript modelsv2 interfaces are incorrect
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
- Attempt to get
createdAppsparameter
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.