API Reference
@univerjs
@univerjs/core
namespaces
JSON1
classes
Readcursor

@univerjs/core v0.1.17Docs


Class: ReadCursor

Extends

  • Cursor

Constructors

new ReadCursor()

new ReadCursor(op?): ReadCursor

Parameters

ParameterType
op?JSONOp

Returns

ReadCursor

Inherited from

Cursor.constructor

Defined in

submodules/univer/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:10

Properties

PropertyTypeInherited fromDefined in
containerJSONOpCursor.containersubmodules/univer/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:8
idxnumberCursor.idxsubmodules/univer/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:9
indexesnumber[]Cursor.indexessubmodules/univer/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:6
lcIdxnumberCursor.lcIdxsubmodules/univer/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:7
parentsJSONOp[]Cursor.parentssubmodules/univer/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:5

Methods

[iterator]()

iterator: Generator<Key, void, unknown>

Returns

Generator<Key, void, unknown>

Defined in

submodules/univer/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:22


ascend()

ascend(): void

Returns

void

Inherited from

Cursor.ascend

Defined in

submodules/univer/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:11


clone()

clone(): ReadCursor

Returns

ReadCursor

Defined in

submodules/univer/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:21


descendFirst()

descendFirst(): boolean

Returns

boolean

Defined in

submodules/univer/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:18


eachDrop()

eachDrop<W>(w, fn): void

Type Parameters

Type Parameter
W extends null | WriteCursor

Parameters

ParameterType
wW
fn(slot, w) => void

Returns

void

Defined in

submodules/univer/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:25


eachPick()

eachPick<W>(w, fn): void

Type Parameters

Type Parameter
W extends null | WriteCursor

Parameters

ParameterType
wW
fn(slot, w) => void

Returns

void

Defined in

submodules/univer/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:24


get()

get(): null | (string | number | JSONOpList | JSONOpComponent)[]

Returns

null | (string | number | JSONOpList | JSONOpComponent)[]

Defined in

submodules/univer/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:15


getComponent()

getComponent(): null | JSONOpComponent

Returns

null | JSONOpComponent

Defined in

submodules/univer/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:17


getKey()

getKey(): Key

Returns

Key

Defined in

submodules/univer/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:16


getPath()

getPath(): Path

Returns

Path

Inherited from

Cursor.getPath

Defined in

submodules/univer/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:12


nextSibling()

nextSibling(): boolean

Returns

boolean

Defined in

submodules/univer/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:19


traverse()

traverse<W>(w, fn): void

Type Parameters

Type Parameter
W extends null | WriteCursor

Parameters

ParameterType
wW
fn(c, w) => void

Returns

void

Defined in

submodules/univer/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:23


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.