alexa / alexa-skills-kit-sdk-for-nodejs

The Alexa Skills Kit SDK for Node.js helps you get a skill up and running quickly, letting you focus on skill logic instead of boilerplate code.
Apache License 2.0
3.12k stars 735 forks source link

Fix return type of intent request util functions #702

Open arnaudcourtecuisse opened 2 years ago

arnaudcourtecuisse commented 2 years ago

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

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

Checklist

License