UNPKG

botbuilder-core

Version:

Core components for Microsoft Bot Builder. Components in this library can run either in a browser or on the server.

41 lines 1.64 kB
/** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ /** * Values persisted for the lifetime of the turn as part of the [TurnContext](xref:botbuilder-core.TurnContext). * * @remarks Typical values stored here are objects which are needed for the lifetime of a turn, such * as [Storage](xref:botbuilder-core.Storage), [BotState](xref:botbuilder-core.BotState), [ConversationState](xref:botbuilder-core.ConversationState), [LanguageGenerator](xref:botbuilder-dialogs-adaptive.LanguageGenerator), [ResourceExplorer](xref:botbuilder-dialogs-declarative.ResourceExplorer), etc. */ export declare class TurnContextStateCollection extends Map<any, any> { /** * Gets a typed value from the [TurnContextStateCollection](xref:botbuilder-core.TurnContextStateCollection). * * @param key The values key. */ get<T = any>(key: any): T; /** * Gets a value from the [TurnContextStateCollection](xref:botbuilder-core.TurnContextStateCollection). * * @param key The values key. */ get(key: any): any; /** * Push a value by key to the turn's context. * * @remarks * The keys current value (if any) will be saved and can be restored by calling [pop()](#pop). * @param key The values key. * @param value The new value. */ push(key: any, value: any): void; /** * Restores a keys previous value, and returns the value that was removed. * * @param key The values key. * @returns The removed value. */ pop(key: any): any; } //# sourceMappingURL=turnContextStateCollection.d.ts.map