Question: The official docs for Microsoft bot-framework [SDK v4](https://learn.microsoft.com/en-us/azure/bot-service/?view=azure-bot-service-4.0) do not demonstrate how to send a typing indicator (whereas [v3 has these instructions](https://learn.microsoft.com/en-us/azure/bot-service/nodejs/bot-builder-nodejs-send-typing-indicator?view=azure-bot-service-3.0)). I'm using DirectLine and botframework-webchat. 

How do I do this? Thanks!

Answer: 
You can send a typing indicator by sending an activity with the `typing` type. Read more about how to [send a typing indicator](https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-howto-send-messages?view=azure-bot-service-4.0&tabs=javascript#send-a-typing-indicator).

```js
await context.sendActivities([
            { type: ActivityTypes.Typing },
            { type: 'delay', value: 3000 },
            { type: ActivityTypes.Message, text: 'Finished typing' }
        ]);

```

Also the [showTypingMiddleware](https://github.com/Microsoft/botbuilder-js/blob/0313ec3e95a13ba9e5c3dd77a1b427506fbec07b/libraries/botbuilder-core/src/showTypingMiddleware.ts) can be used to automatically send the typing indicator. This snippet will also show how to send a typing indicator, if you are looking for more sample code.
I think you can just add in OnTurnAsync function before await base.OnTurnAsync(turnContext, cancellationToken); :

```
await turnContext.SendActivityAsync(new Activity { Type = ActivityTypes.Typing }, cancellationToken);

```