diff --git a/types/autobahn/index.d.ts b/types/autobahn/index.d.ts index 969c703478..59bb2c404d 100644 --- a/types/autobahn/index.d.ts +++ b/types/autobahn/index.d.ts @@ -25,7 +25,7 @@ declare namespace autobahn { leave(reason: string, message: string): void; - call(procedure: string, args?: any[], kwargs?: any, options?: ICallOptions): When.Promise; + call(procedure: string, args?: any[] | any, kwargs?: any, options?: ICallOptions): When.Promise; publish(topic: string, args?: any[], kwargs?: any, options?: IPublishOptions): When.Promise; @@ -96,7 +96,7 @@ declare namespace autobahn { kwargs: any; } - type SubscribeHandler = (args?: any[], kwargs?: any, details?: IEvent) => void; + type SubscribeHandler = (args?: any[] | any, kwargs?: any, details?: IEvent) => void; interface ISubscription { topic: string; @@ -206,7 +206,7 @@ declare namespace autobahn { type DeferFactory = () => When.Promise; - type OnChallengeHandler = (session: Session, method: string, extra: any) => string; + type OnChallengeHandler = (session: Session, method: string, extra: any) => string | When.Promise; interface IConnectionOptions { use_es6_promises?: boolean;