Optional ReadonlynameAn optional name to qualify this provider. If specified, the token must be resolved using the same name.
Example:
export class ExtensionContext {
// Decorator-based injection
constructor(@Inject(ISecretStorage) @Named("persistent") secretStorage: SecretStorage) {}
// Function-based injection
constructor(secretStorage = inject(ISecretStorage, "persistent")) {}
}
ReadonlyuseThe existing token to alias, with an optional name qualifier.
Example:
container.register(ISecretStorage, {
useExisting: PersistentSecretStorage,
});
// Or in case we need to alias a name-qualified token
container.register(ISecretStorage, {
useExisting: [PersistentSecretStorage, "fileSystem"],
});
Aliases another registered token.
Resolving this token will return the value of the aliased one.