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

@univerjs/core v0.1.17Docs


Class: WriteCursor

Extends

  • Cursor

Constructors

new WriteCursor()

new WriteCursor(op?): WriteCursor

Parameters

ParameterType
op?JSONOp

Returns

WriteCursor

Overrides

Cursor.constructor

Defined in

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

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
pendingDescentPath-submodules/univer/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

submodules/univer/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

submodules/univer/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

submodules/univer/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

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


get()

get(): JSONOp

Returns

JSONOp

Defined in

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


getComponent()

getComponent(): JSONOpComponent

Returns

JSONOpComponent

Defined in

submodules/univer/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

submodules/univer/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

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


reset()

reset(): void

Returns

void

Defined in

submodules/univer/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

submodules/univer/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

submodules/univer/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

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


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