Skip to content

BlockSuite API Documentation / @blocksuite/sync / NoopDocSource

Class: NoopDocSource

Defined in: doc/impl/noop.ts:3

Implements

Constructors

new NoopDocSource()

new NoopDocSource(): NoopDocSource

Returns

NoopDocSource

Properties

name

name: string = 'noop'

Defined in: doc/impl/noop.ts:4

for debug

Implementation of

DocSource.name

Methods

pull()

pull(_docId, _data): null

Defined in: doc/impl/noop.ts:6

Parameters

_docId

string

_data

Uint8Array

Returns

null

Implementation of

DocSource.pull


push()

push(_docId, _data): void

Defined in: doc/impl/noop.ts:10

Parameters

_docId

string

_data

Uint8Array

Returns

void

Implementation of

DocSource.push


subscribe()

subscribe(_cb, _disconnect): () => void

Defined in: doc/impl/noop.ts:12

Subscribe to updates from peer

Parameters

_cb

(docId, data) => void

_disconnect

(reason) => void

Returns

Function

unsubscribe function

Returns

void

Implementation of

DocSource.subscribe