Skip to content

[F] getUseDependencies

function getUseDependencies(
program,
target,
searchEnum?
):
| Map<Namespace,
| Version
| Map<Version, Version>>
| undefined;

Gets explicit @useDependency selections keyed by dependency namespace. Values are either a fixed dependency version or a map from local versions to dependency versions. Returns undefined when no applicable metadata is found.

Namespace lookup stops at the first namespace or version enum with dependency metadata, searching outward through parents rather than merging their selections. Returned maps are newly allocated and contain shared version objects.

ParameterTypeDefault valueDescription
programProgramundefined-
targetNamespace | Enumundefined-
searchEnumbooleantrueWhether namespace lookup also checks each namespace’s version enum. Defaults to true; ignored when the target is already an enum.

| Map<Namespace, | Version | Map<Version, Version>> | undefined