mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: LongYinan <lynweklm@gmail.com>
961 B
961 B
BlockSuite API Documentation / @blocksuite/std / gfx / watch
Function: watch()
watch<
V,T>(fn): (_,context) =>ClassAccessorDecoratorResult<GfxPrimitiveElementModel<BaseElementProps>,V>
The watch decorator is used to watch the property change of the element.
You can thinks of it as a decorator version of elementUpdated slot of the surface model.
Type Parameters
V
V
T
T extends GfxPrimitiveElementModel<BaseElementProps>
Parameters
fn
WatchFn<T>
Returns
(
_,context):ClassAccessorDecoratorResult<GfxPrimitiveElementModel<BaseElementProps>,V>
Parameters
_
unknown
context
ClassAccessorDecoratorContext
Returns
ClassAccessorDecoratorResult<GfxPrimitiveElementModel<BaseElementProps>, V>