Skip to main content

index/classes/TypingIndicatorDebouncer.md

Constructors​

Constructor​

new TypingIndicatorDebouncer(config?, _logger?): TypingIndicatorDebouncer

Parameters​

ParameterType
config?TypingIndicatorConfig
_logger?Logger

Returns​

TypingIndicatorDebouncer

Accessors​

activeCount​

Get Signature​

get activeCount(): number

Get count of active typing indicators

Returns​

number

Number of users currently typing

Methods​

clear()​

clear(): void

Clear all pending typing indicators

Returns​

void


indicate()​

indicate(userId, roomId): void

Indicate that a user is typing

If user is already typing, the debounce window is reset. Stop indicator is sent after delayMs of inactivity.

Parameters​

ParameterTypeDescription
userIdstringUser identifier
roomIdstringRoom identifier (e.g., 'token:anime')

Returns​

void


stopTyping()​

stopTyping(userId, roomId): void

Explicitly stop typing indicator for a user

Parameters​

ParameterTypeDescription
userIdstringUser identifier
roomIdstringRoom identifier

Returns​

void