Adding the 'resources' property to AlexaObject (#18210)

* Adding the 'resources' property to AlexaObject

* Updating alexa-sdk tests

* Adding myself to credits for alexa-sdk
This commit is contained in:
Ben
2017-07-24 10:09:19 -07:00
committed by Andy
parent 0a1c229ee5
commit eb11dbc386
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -2,6 +2,7 @@ import * as Alexa from "alexa-sdk";
const handler = (event: Alexa.RequestBody<Alexa.Request>, context: Alexa.Context, callback: () => void) => {
let alexa = Alexa.handler(event, context);
alexa.resources = {};
alexa.registerHandlers(handlers);
alexa.execute();
};
+2
View File
@@ -3,6 +3,7 @@
// Definitions by: Pete Beegle <https://github.com/petebeegle>
// Huw <https://github.com/hoo29>
// pascalwhoop <https://github.com/pascalwhoop>
// Ben <https://github.com/blforce>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
@@ -20,6 +21,7 @@ export interface AlexaObject<T> extends Handler<T> {
state: any;
appId: any;
response: any;
resources: any;
dynamoDBTableName: any;
saveBeforeResponse: boolean;
registerHandlers: (...handlers: Array<Handlers<T>>) => any;