The name of the registry.
Register a new object.
The name of the object. Referenced by other objects.
The object.
Optionaltargets: Partial<A mapping from keys of the object to other object names. Should mirror the structure of obj.
Populate the registered objects.
Solves circular import issues by populating mutually referencing objects at runtime.
To use, create a new registry. In each file in the import cycle, register the relevant object by calling the
registermethod. In the nearest shared importing ancestor file (e.g. closestindex.tsbarrel file), call therunmethod on the registry after importing/exporting all other files.