Skip to content

eo-typewriterjs


eo-typewriterjs / withSelectionCleared

Function: withSelectionCleared() ​

ts
function withSelectionCleared(state, cursorId): TTypewriterState;

Defined in: core/state/helpers/typewriter-state.helper.ts:79

Parameters ​

ParameterTypeDescription
stateTTypewriterStateThe current typewriter state
cursorIdstringThe cursor id whose selection should be cleared

Returns ​

TTypewriterState

A new TTypewriterState with the selection removed

Description ​

Return a new state with the selection for the given cursor cleared. If the cursor had no selection the same state is returned.

Released under the MIT License.