Skip to content

[F] getDataDecoratorValue

function getDataDecoratorValue(
program,
decoratorFqn,
target): unknown;

Get the stored value for a data decorator applied to a target. For no-arg data decorators, returns true if applied, undefined otherwise. For single-arg data decorators, returns the value directly. For multi-arg data decorators, returns a record of { paramName: value }.

ParameterTypeDescription
programProgramThe current program.
decoratorFqnstringThe fully-qualified name of the decorator (e.g., “MyLib.myDec”).
targetTypeThe type to get the value for.

unknown

The stored value, or undefined if the decorator was not applied.