diff --git a/types/alexa-sdk/index.d.ts b/types/alexa-sdk/index.d.ts index c3b71258da..88e25927d6 100644 --- a/types/alexa-sdk/index.d.ts +++ b/types/alexa-sdk/index.d.ts @@ -6,14 +6,14 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 -export function handler(event: RequestBody, context: Context, callback?: (err: any, response: any) => void ): AlexaObject; +export function handler(event: RequestBody, context: Context, callback?: (err: any, response: any) => void ): AlexaObject; export function CreateStateHandler(state: string, obj: any): any; export let StateString: string; export type ConfirmationStatuses = "NONE" | "DENIED" | "CONFIRMED"; export type DialogStates = "STARTED" | "IN_PROGRESS" | "COMPLETED"; -export interface AlexaObject extends Handler { +export interface AlexaObject extends Handler { _event: any; _context: any; _callback: any; @@ -22,21 +22,21 @@ export interface AlexaObject extends Handler { response: any; dynamoDBTableName: any; saveBeforeResponse: boolean; - registerHandlers: (...handlers: Handlers[]) => any; + registerHandlers: (...handlers: Handlers[]) => any; execute: () => void; } -export interface Handlers { - [intent: string]: (this: Handler) => void; +export interface Handlers { + [intent: string]: (this: Handler) => void; } -export interface Handler { +export interface Handler { on: any; emit(event: string, ...args: any[]): boolean; emitWithState: any; state: any; handler: any; - event: RequestBody; + event: RequestBody; attributes: any; context: any; name: any; @@ -55,10 +55,10 @@ export interface Context { awsRequestId: string; } -export interface RequestBody { +export interface RequestBody { version: string; session: Session; - request: LaunchRequest & IntentRequest & SessionEndedRequest; + request: T; } export interface Session {