Locator
Hierarchy
Index
Properties
Properties
identHash
Unique hash of a package scope and name. Used as key in various places, so that two idents can be quickly compared.
locatorHash
Unique hash of a package locator. Used as key in various places so that two locators can be quickly compared.
name
Name of the package (eg. node
).
reference
A package reference uniquely identifies a package (eg. 1.2.3
).
scope
Scope of the package, without the @
prefix (eg. types
).
Locator are just like idents (including their
identHash
), except that they also contain a reference and an additional comparator hash. They are in this regard very similar to descriptors except that each descriptor may reference multiple valid candidate packages whereas each locators can only reference a single package.This interesting property means that each locator can be safely turned into a descriptor (using
convertLocatorToDescriptor
), but not the other way around (except in very specific cases).