mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-01 17:50:50 +08:00
716 B
716 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
(_, context) => ClassAccessorDecoratorResult<T, V>