Skip to content

BlockSuite API Documentation / @blocksuite/store / Slot

Class: Slot<T>

Type Parameters

T = void

Implements

  • Disposable

Constructors

new Slot()

new Slot<T>(): Slot<T>

Returns

Slot<T>

Properties

subscribe()

subscribe: <U>(selector, callback, config?) => Disposable

Type Parameters

U

Parameters

selector

callback

config?

config.equalityFn?

config.filter?

Returns

Disposable

Defined in

packages/framework/global/dist/utils/slot.d.ts:6

Methods

dispose()

dispose(): void

Returns

void

Implementation of

Disposable.dispose

Defined in

packages/framework/global/dist/utils/slot.d.ts:10


emit()

emit(v): void

Parameters

v: T

Returns

void

Defined in

packages/framework/global/dist/utils/slot.d.ts:11


filter()

filter(testFun): Slot<T>

Parameters

testFun

Returns

Slot<T>

Defined in

packages/framework/global/dist/utils/slot.d.ts:12


flatMap()

flatMap<U>(mapper): Slot<U>

Type Parameters

U

Parameters

mapper

Returns

Slot<U>

Defined in

packages/framework/global/dist/utils/slot.d.ts:13


on()

on(callback): Disposable

Parameters

callback

Returns

Disposable

Defined in

packages/framework/global/dist/utils/slot.d.ts:14


once()

once(callback): Disposable

Parameters

callback

Returns

Disposable

Defined in

packages/framework/global/dist/utils/slot.d.ts:15


pipe()

pipe(that): Slot<T>

Parameters

that: Slot<T>

Returns

Slot<T>

Defined in

packages/framework/global/dist/utils/slot.d.ts:16


toDispose()

toDispose(disposables): Slot<T>

Parameters

disposables: Disposable[]

Returns

Slot<T>

Defined in

packages/framework/global/dist/utils/slot.d.ts:17


unshift()

unshift(callback): Disposable

Parameters

callback

Returns

Disposable

Defined in

packages/framework/global/dist/utils/slot.d.ts:18