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

fix: type declaration for IncomingPhoneNumberInstance #560

Merged
merged 1 commit into from Apr 15, 2020

Conversation

thinkingserious
Copy link
Contributor

Fixes #529

Checklist

  • I acknowledge that all my contributions will be made under the project's license

@thinkingserious
Copy link
Contributor Author

Tested with:

const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = require('./lib')(accountSid, authToken);

client.incomingPhoneNumbers('PNXXXXXXXXXXXXXXXXXXXXXXXXXXX')
    .fetch()
    .then(incoming_phone_number => console.log(incoming_phone_number.capabilities));

Response:

{ voice: true, sms: true, mms: true, fax: true }

@childish-sambino
Copy link
Contributor

@thinkingserious Was that a test using TypeScript?

@thinkingserious thinkingserious merged commit b3040b9 into master Apr 15, 2020
@thinkingserious thinkingserious deleted the di-659-type-fix branch April 15, 2020 16:42
@thinkingserious
Copy link
Contributor Author

That code was first put into a file temp.ts and compiled with tsc temp.ts which produced temp.js. After executing node temp.js, the above output was received.

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

Successfully merging this pull request may close these issues.

Incorrect type declaration for IncomingPhoneNumberInstance
2 participants