@univerjscorenamespacesJSON1classesWritecursor

@univerjs/core v0.5.4


Class: WriteCursor

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

Extends

  • Cursor

Constructors

new WriteCursor()

new WriteCursor(op?): WriteCursor

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

Parameters

ParameterType
op?JSONOp

Returns

WriteCursor

Overrides

Cursor.constructor

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

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

Returns

void

Overrides

Cursor.ascend

at()

at(path, fn): 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

Parameters

ParameterType
pathPath
fn(w) => void

Returns

this


descend()

descend(key): 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

Parameters

ParameterType
keyKey

Returns

void


descendPath()

descendPath(path): 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

Parameters

ParameterType
pathPath

Returns

this


get()

get(): 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

Returns

JSONOp


getComponent()

getComponent(): 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

Returns

JSONOpComponent


getPath()

getPath(): Path

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

Returns

Path

Overrides

Cursor.getPath

mergeTree()

mergeTree(data, mergeFn?): 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

Parameters

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

Returns

void


reset()

reset(): 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

Returns

void


write()

write<K>(key, value): 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

Type Parameters

Type Parameter
K extends keyof JSONOpComponent

Parameters

ParameterType
keyK
valueJSONOpComponent[K]

Returns

void


writeAtPath()

writeAtPath<K>(
   path, 
   key, 
   value): 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

Type Parameters

Type Parameter
K extends keyof JSONOpComponent

Parameters

ParameterType
pathPath
keyK
valueJSONOpComponent[K]

Returns

this


writeMove()

writeMove(
   path1, 
   path2, 
   slot?): 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

Parameters

ParameterType
path1Path
path2Path
slot?number

Returns

this