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: Add method overload to VoiceResponse.prototype.play #544

Merged
merged 2 commits into from
Mar 13, 2020
Merged

fix: Add method overload to VoiceResponse.prototype.play #544

merged 2 commits into from
Mar 13, 2020

Conversation

DCtheTall
Copy link
Contributor

@DCtheTall DCtheTall commented Mar 13, 2020

Fixes #538.

This allows users to use a string as the first argument with TypeScript enabled.

Checklist

  • I acknowledge that all my contributions will be made under the project's license
  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the Contribution Guidelines and my PR follows them
  • I have titled the PR appropriately
  • I have updated my branch with the master branch
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation about the functionality in the appropriate .md file
  • I have added inline documentation to the code I modified

If you have questions, please file a support ticket, or create a GitHub Issue in this repository.

@DCtheTall
Copy link
Contributor Author

I did not check the "added tests" box because this change only affects a type declaration file. If there is a way to add test coverage to this change, I am happy to add it to this PR 😄

@childish-sambino
Copy link
Contributor

For a test, you can add a line like this to examples/typescript/example.ts: twiml.play('https://demo.twilio.com/docs/classic.mp3');

That file gets compiled as part of the unit tests.

@DCtheTall
Copy link
Contributor Author

@childish-sambino Done.

@childish-sambino childish-sambino changed the title Add method overload to VoiceResponse.prototype.play fix: Add method overload to VoiceResponse.prototype.play Mar 13, 2020
@childish-sambino childish-sambino merged commit 465d158 into twilio:master Mar 13, 2020
@childish-sambino
Copy link
Contributor

FYI, I've updated the generator to apply this change universally: #545

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 TypeScript types for TwiML
2 participants