35 lines
No EOL
1.4 KiB
TypeScript
35 lines
No EOL
1.4 KiB
TypeScript
import { BotState } from './botState';
|
|
import { Storage } from './storage';
|
|
import { TurnContext } from './turnContext';
|
|
/**
|
|
* Reads and writes conversation state for your bot to storage.
|
|
*
|
|
* @remarks
|
|
* Each conversation your bot has with a user or group will have its own isolated storage object
|
|
* that can be used to persist conversation tracking information between turns of the conversation.
|
|
* This state information can be reset at any point by calling [clear()](#clear).
|
|
*
|
|
* ```JavaScript
|
|
* const { ConversationState, MemoryStorage } = require('botbuilder');
|
|
*
|
|
* const conversationState = new ConversationState(new MemoryStorage());
|
|
* ```
|
|
*/
|
|
export declare class ConversationState extends BotState {
|
|
private namespace;
|
|
/**
|
|
* Creates a new ConversationState instance.
|
|
*
|
|
* @param storage Storage provider to persist conversation state to.
|
|
* @param namespace (Optional) namespace to append to storage keys. Defaults to an empty string.
|
|
*/
|
|
constructor(storage: Storage, namespace?: string);
|
|
/**
|
|
* Returns the storage key for the current conversation state.
|
|
*
|
|
* @param context Context for current turn of conversation with the user.
|
|
* @returns The storage key for the current conversation state.
|
|
*/
|
|
getStorageKey(context: TurnContext): string | undefined;
|
|
}
|
|
//# sourceMappingURL=conversationState.d.ts.map
|