Search Docs
Loading...
Skip to content

Type Alias: AssetMetaData

type AssetMetaData = object & Record<string, unknown>;

Asset metadata.

The known named fields are descriptive — they hint at how the asset is meant to be created/used (which block type, mime type, dimensions, etc.). The trailing Record<string, unknown> extension lets sources attach arbitrary data without losing the named-field type safety.

The native engine stores meta as a flat string map at the C++ layer; non-string values pass through TypeScript but throw a TypeError at the binding boundary. Treat the rich shape as documentation for the named fields while sticking to string values across bindings.

Type Declaration#

Name Type Description
mimeType? string The mime type of this asset or the data behind the asset’s uri.
blockType? string Block type id to create from this asset.
fillType? string -
shapeType? string -
kind? string -
uri? string -
thumbUri? string -
previewUri? string -
sourceSet? Source[] -
filename? string -
vectorPath? string -
width? number -
height? number -
duration? string -
effectType? string WASM types this as EffectType (a union of effect kind strings); shared widens to string so this type does not depend on WASM-specific enums.
blurType? string WASM types this as BlurType; shared widens to string.
looping? boolean -