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 737 forks source link

LambdaHandler is not exported #614

Closed mikelid-zz closed 4 years ago

mikelid-zz commented 4 years ago

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[x] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Expected Behavior

LambdaHandler is the public type produced by CustomSkillBuilder.lambda() but the type is not exported which causes trouble for skills using Typescript. Specifically the following should be legal

export const handler: LambdaHandler;

Possible Solution

add LambdaHandler to ask-sdk-core/index.ts

Steps to Reproduce (for bugs)

const handler: LambdaHandler
-> Cannot find 'LambdaHandler'

alternatively:

export const handler = SkillBuilders.custom().lambda();
-> Error TS2742: The inferred type of 'handler' cannot be named without a reference to 'ask-sdk-ui/node_modules/ask-sdk-core/dist/skill/factory/BaseSkillFactory'. This is likely not portable. A type annotation is necessary.

Your Environment

ShenChen93 commented 4 years ago

Hi @mikelid ,

Thanks for reporting this issue. Made the PR #615 to fix. Closed this issue as the fix commit already merged.

Thanks, Shen