Skip to main content

getMetadata

Retrieves metadata that is stored in a NodeBlock using the @metadata decorator. This method can be used to exchange data between blocks.

Signature

getMetadata<Data>(block: NodeBlock, reference: string): Data | undefined

Parameters

NameTypeOptionalDescription
blockNodeBlockNoSpecifies the NodeBlock to retrieve metadata for.
referencestringNoSpecifies the metadata reference.

Return value

Returns the metadata of the specified type Data or undefined if no metadata was found.