Files
AFFiNE-Mirror/blocksuite/docs/api/@blocksuite/std/gfx/functions/GfxCompatible.md
2025-03-28 07:20:34 +00:00

893 B

BlockSuite API Documentation


BlockSuite API Documentation / @blocksuite/std / gfx / GfxCompatible

Function: GfxCompatible()

GfxCompatible<Props, T>(BlockModelSuperClass): typeof GfxBlockElementModel

Convert a BlockModel to a GfxBlockElementModel.

Type Parameters

Props

Props extends GfxCompatibleProps

T

T extends Constructor<BlockModel<Props>> = Constructor<BlockModel<Props>>

Parameters

BlockModelSuperClass

T

The BlockModel class to be converted.

Returns

typeof GfxBlockElementModel

The returned class is a subclass of the GfxBlockElementModel class and the given BlockModelSuperClass.