alexa-skills-kit-sdk-for-nodejs icon indicating copy to clipboard operation
alexa-skills-kit-sdk-for-nodejs copied to clipboard

Fix return type of intent request util functions

Open arnaudcourtecuisse opened this issue 3 years ago • 0 comments

Description

These function can return nullish values but are declared to return a non-nullish type (either Slot or SlotValue or string) I fixed the return type declaration to match the implementation.

Motivation and Context

It fixes issue #701

Testing

I used npm link so that my skill uses my local version of ask-sdk-core. Then, with ngrok, I exposed my local skill endpoint and tested it with my Alexa device.

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [x] Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] Docs(Add new document content)
  • [ ] Translate Docs(Translate document content)

Breaks TS builds that handled the nullish value at runtime with a try/catch.

Checklist

  • [x] My code follows the code style of this project
  • [x] My change requires a change to the documentation
  • [x] I have updated the documentation accordingly
  • [x] I have read the README document
  • [ ] I have added tests to cover my changes
  • [x] All new and existing tests passed
  • [x] My commit message follows Conventional Commit Guideline

License

  • [x] By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

arnaudcourtecuisse avatar Jan 25 '22 22:01 arnaudcourtecuisse