Skip to content

[F] setAutoDecorator

function setAutoDecorator(
program,
decoratorFqn,
target,
value?): void;

Programmatically apply an auto decorator to a target, storing its argument values.

Mirrors what the synthesized auto dec implementation does when the decorator is written in source, so emitters and mutators can mark synthetic types the same way without reaching into the program state map directly.

ParameterTypeDescription
programProgramThe current program.
decoratorFqnstringThe fully-qualified name of the decorator (e.g., “MyLib.myDec”).
targetTypeThe type to mark.
valueRecord<string, unknown>The stored { paramName: value } record (defaults to {} for a no-arg decorator).

void