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
Name | Type | Optional | Description |
---|---|---|---|
block | NodeBlock | No | Specifies the NodeBlock to retrieve metadata for. |
reference | string | No | Specifies the metadata reference. |
Return value
Returns the metadata of the specified type Data
or undefined
if no metadata was found.