Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions libraries/botbuilder-dialogs/src/waterfallDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,7 @@ export class WaterfallDialog<O extends object = {}> extends Dialog<O> {
* @param instance The instance of the current dialog.
* @param reason The reason the dialog is ending.
*/
public async endDialog(context: TurnContext, instance: DialogInstance, reason: DialogReason) {

public async endDialog(context: TurnContext, instance: DialogInstance, reason: DialogReason): Promise<void> {
const state: WaterfallDialogState = instance.state as WaterfallDialogState;
const instanceId = state.values['instanceId'];
if (reason === DialogReason.endCalled) {
Expand All @@ -256,7 +255,7 @@ export class WaterfallDialog<O extends object = {}> extends Dialog<O> {
}
}

private waterfallStepName(index) {
private waterfallStepName(index: number): string {
// Log Waterfall Step event. Each event has a distinct name to hook up
// to the Application Insights funnel.
var stepName = '';
Expand Down Expand Up @@ -288,8 +287,8 @@ interface WaterfallDialogState {
* instances of a given waterfall dialog.
* Source: https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript
*/
function generate_guid() {
function s4() {
function generate_guid(): string {
function s4(): string {
return Math.floor((1 + Math.random()) * 0x10000)
.toString(16)
.substring(1);
Expand Down