Skip to content

API reference / Common / Engine types / TextLength

Type Alias: TextLength ​

ts
type TextLength = number;

A span of text, in Unicode codepoints — a measurement, belonging to no space.

What every node reports from len, what a splice states as its new_len, and what a [TextOffset] advances by. It has no origin, which is what lets one type serve a story, a block, a line and a run alike.