mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 20:38:52 +00:00
804 B
804 B
BlockSuite API Documentation / @blocksuite/std / gfx / convert
Function: convert()
convert<
V,T>(fn): (_,context) =>ClassAccessorDecoratorResult<T,V>
The convert decorator is used to convert the property value before it's set to the Y map.
Note:
- This decorator function will not execute in model initialization.
Type Parameters
V
V
T
T extends GfxPrimitiveElementModel<BaseElementProps>
Parameters
fn
(propValue, instance) => unknown
Returns
Function
Parameters
_
unknown
context
ClassAccessorDecoratorContext
Returns
ClassAccessorDecoratorResult<T, V>