Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error TS2740: ???? #5

Closed
BMeridian opened this issue Sep 26, 2022 · 2 comments
Closed

error TS2740: ???? #5

BMeridian opened this issue Sep 26, 2022 · 2 comments

Comments

@BMeridian
Copy link

TSError: ⨯ Unable to compile TypeScript:
etradeApiTest.ts(152,9): error TS2740: Type 'CancelOrderResponse' is missing the following properties from type 'Account[]': length, pop, push, concat, and 28 more.

at createTSError (/usr/local/lib/node_modules/ts-node/src/index.ts:843:12)
at reportTSError (/usr/local/lib/node_modules/ts-node/src/index.ts:847:19)
at getOutput (/usr/local/lib/node_modules/ts-node/src/index.ts:1057:36)
at Object.compile (/usr/local/lib/node_modules/ts-node/src/index.ts:1411:41)
at transformSource (/usr/local/lib/node_modules/ts-node/src/esm.ts:400:37)
at /usr/local/lib/node_modules/ts-node/src/esm.ts:278:53
at async addShortCircuitFlag (/usr/local/lib/node_modules/ts-node/src/esm.ts:409:15)
at async nextLoad (node:internal/modules/esm/loader:163:22)
at async ESMLoader.load (node:internal/modules/esm/loader:602:20)
at async ESMLoader.moduleProvider (node:internal/modules/esm/loader:458:11) {

diagnosticCodes: [ 2740 ]
}

this works:

let results = await eTrade.listAccounts();
console.log(results[2]);
// console.log(results[2].accountIdKey);
const _accountIdKey = results[2].accountIdKey

@tflanagan
Copy link
Owner

Not sure I understand this.

The error references 'CancelOrderResponse', but also 'Account'?

Can you provide some more details?

@tflanagan
Copy link
Owner

I'm going to close this.

If you are still experiencing this issue, please reopen this, but can you provide some steps to reproduce this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants