@univerjscorenamespacesJSON1classesWritecursor

@univerjs/core v0.5.0-beta.1Docs


Class: WriteCursor

Extends

  • Cursor

Constructors

new WriteCursor()

new WriteCursor(op?): WriteCursor

Parameters

ParameterType
op?JSONOp

Returns

WriteCursor

Overrides

Cursor.constructor

Defined in

packages/api/tmp/univer-pro/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:30

Properties

PropertyTypeInherited fromDefined in
containerJSONOpCursor.containerpackages/api/tmp/univer-pro/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:8
idxnumberCursor.idxpackages/api/tmp/univer-pro/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:9
indexesnumber[]Cursor.indexespackages/api/tmp/univer-pro/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:6
lcIdxnumberCursor.lcIdxpackages/api/tmp/univer-pro/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:7
parentsJSONOp[]Cursor.parentspackages/api/tmp/univer-pro/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:5
pendingDescentPath-packages/api/tmp/univer-pro/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:28

Methods

ascend()

ascend(): void

Returns

void

Overrides

Cursor.ascend

Defined in

packages/api/tmp/univer-pro/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:38


at()

at(path, fn): this

Parameters

ParameterType
pathPath
fn(w) => void

Returns

this

Defined in

packages/api/tmp/univer-pro/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:40


descend()

descend(key): void

Parameters

ParameterType
keyKey

Returns

void

Defined in

packages/api/tmp/univer-pro/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:36


descendPath()

descendPath(path): this

Parameters

ParameterType
pathPath

Returns

this

Defined in

packages/api/tmp/univer-pro/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:37


get()

get(): JSONOp

Returns

JSONOp

Defined in

packages/api/tmp/univer-pro/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:35


getComponent()

getComponent(): JSONOpComponent

Returns

JSONOpComponent

Defined in

packages/api/tmp/univer-pro/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:33


getPath()

getPath(): Path

Returns

Path

Overrides

Cursor.getPath

Defined in

packages/api/tmp/univer-pro/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:43


mergeTree()

mergeTree(data, mergeFn?): void

Parameters

ParameterType
dataJSONOp
mergeFn?(c, w) => void

Returns

void

Defined in

packages/api/tmp/univer-pro/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:39


reset()

reset(): void

Returns

void

Defined in

packages/api/tmp/univer-pro/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:32


write()

write<K>(key, value): void

Type Parameters

Type Parameter
K extends keyof JSONOpComponent

Parameters

ParameterType
keyK
valueJSONOpComponent[K]

Returns

void

Defined in

packages/api/tmp/univer-pro/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:34


writeAtPath()

writeAtPath<K>(
   path, 
   key, 
   value): this

Type Parameters

Type Parameter
K extends keyof JSONOpComponent

Parameters

ParameterType
pathPath
keyK
valueJSONOpComponent[K]

Returns

this

Defined in

packages/api/tmp/univer-pro/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:41


writeMove()

writeMove(
   path1, 
   path2, 
   slot?): this

Parameters

ParameterType
path1Path
path2Path
slot?number

Returns

this

Defined in

packages/api/tmp/univer-pro/node_modules/.pnpm/ot-json1@1.0.2/node_modules/ot-json1/dist/cursor.d.ts:42