Skip to content

[F] getExamples

function getExamples(program, target): readonly Example[];

Gets examples stored on the target in registration order, or an empty array. Returns the stored collection as readonly without copying; values remain TypeSpec values, not JSON.

ParameterType
programProgram
target| Enum | Model | ModelProperty | Scalar | Union

readonly Example[]