botbuilder-core
Version:
Core components for Microsoft Bot Builder. Components in this library can run either in a browser or on the server.
34 lines • 1.14 kB
TypeScript
/**
* @module botbuilder
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { Middleware } from './middlewareSet';
import { TurnContext } from './turnContext';
/**
* Middleware for adding an object to or registering a service with the current turn context.
*/
export declare class RegisterClassMiddleware<T> implements Middleware {
private _key;
/**
* Initialize a new instance of the RegisterClassMiddleware class.
*
* @param service The object or service to add.
* @param key The key for service object in turn state.
*/
constructor(service: T, key: string | symbol);
/**
* The object or service to add to the turn context.
*/
service: T;
/**
* Adds the associated object or service to the current turn context.
*
* @param turnContext The context object for this turn.
* @param next The delegate to call to continue the bot middleware pipeline.
*/
onTurn(turnContext: TurnContext, next: () => Promise<void>): Promise<void>;
}
//# sourceMappingURL=registerClassMiddleware.d.ts.map