mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-04 11:09:01 +08:00
205cd7a86d
Closes: BS-2946
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>