Property 'calls' does not exist on type 'Vonage'
See original GitHub issueIssue
Vonage in relation to Typescript.
After initializing a Vonage object, the calls
property is not recognized as being part of the object, since it’s not defined in d.ts
.
Code
import Vonage from '@vonage/server-sdk';
const vonage = new Vonage({
apiKey: process.env.VONAGE_API_KEY,
apiSecret: process.env.VONAGE_API_SECRET,
applicationId: process.env.VONAGE_APPLICATION_ID,
});
vonage.calls.create({...}, (error: any, response: any) => {...}).
Error
The calls
in vonage.calls.create
is underlined and specifies the following problem: Property 'calls' does not exist on type 'Vonage'.
Request
Is there any short-term plan on adding typing for this as well?
Or is there a workaround that I am not aware of? Besides using // @ts-ignore
.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to resolve 'calls' does not exist on type '() => any'
It looks like SshRefService currently defines getClient() : any . As a result, it's correctly throwing this error. This is happening because ...
Read more >DocStrap Source: modules/nxmCall.js - Vonage Developer
@event Application#call:status:changed * @property {NXMCall} nxmCall - the actual event * @example <caption>listen for nxmCall status changed events on ...
Read more >Error - OpenTok.js | Vonage Video API Developer
One of the signal properties — data, type, or to — is invalid. Or the data cannot be parsed as JSON. 404, The...
Read more >Pages - Vonage Contact Center PILOT Product Documentation for ...
Vonage Contact Center can record all inbound and outbound calls. ... Choose from different media types available in your account, such as Phone, ......
Read more >Number Insight API - Vonage Developer
There are three levels of Number Insight API available: Basic, Standard and Advanced. ... If a number does not have a country code...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@serfermorhc and @speak-jure Apologies as we are behind on updating the code snippets and documentation.
calls
is no longer a property onnumbers
. We updated the function names to be more descriptive. Instead of callingvonage.numbers.calls.create
, you can callvonage.numbers.createOutboundCall
. I have added a migration guide that should explain all the changes.Another point of note, we updated most of the functions to accept a parameters object instead of just passing in parameters. We are looking to build out technical documentation for all our functions. Once that is ready to go, you will be able to get a more detailed rundown of what needs to be passed into each call.
Hey Kelly!
Thank you for your reply. I assumed it’s an upcoming improvement, but I’m glad to have gotten your confirmation. I have a workaround set up by using
@ts-ignore
, so I agree that my request is more of a nice to have than anything else.Keep up the good work.