@mocanvas/editor · interface

TLGlobalAssetPropsMap

interface TLGlobalAssetPropsMap

Props of every registered asset type, keyed by asset type. Empty by design: it is filled in by module augmentation, the same way TLGlobalShapePropsMap is.

``ts declare module "@mocanvas/mocanvas" { interface TLGlobalAssetPropsMap { "figma-file": { fileKey: string; nodeId: string; w: number; h: number } } } ``

An AssetUtil reads this the way a ShapeUtil reads the shape map: its static props is checked against the registered props, and the asset records it produces are typed from them.

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.