@jsvision/code-editor / documentOffset
Function: documentOffset()
documentOffset(
value,maximum?):DocumentOffset
Defined in: code-editor/src/document/types.ts:207
Creates a trusted document offset after validating its numeric domain and optional bound.
Parameters
value
number
maximum?
number = Number.MAX_SAFE_INTEGER
Returns
Example
ts
const start = documentOffset(0, snapshot.length);