Skip to content

eo-typewriterjs


eo-typewriterjs / TMoveEvent

Type Alias: TMoveEvent

ts
type TMoveEvent = TBaseEvent & object;

Defined in: core/events/types/move-event.type.ts:19

Type Declaration

NameTypeDefined in
timenumbercore/events/types/move-event.type.ts:20
cursorIdstringcore/events/types/move-event.type.ts:21
boundary?"start" | "end"core/events/types/move-event.type.ts:22
offsetnumbercore/events/types/move-event.type.ts:23
byTAdvanceModeInputcore/events/types/move-event.type.ts:24
sourceCommandIdstringcore/events/types/move-event.type.ts:25

Description

A scheduled event that moves a cursor.

When boundary is present it takes precedence:

  • "start": jump to absolute document start (index 0)
  • "end": jump to absolute document end (index text.length)

When boundary is absent the reducer moves by offset units using by:

  • positive offset moves right, negative offset moves left

This event is instant - it does not consume any timeline duration.

Released under the MIT License.