Interface DependencyDescriptor<T>Experimental

A descriptor of a service declared as a dependency of another service.

Remarks

Currently, this is only used to describe the dependencies of a service to its corresponding factory function.

Example

@Service([[AnotherService, Optional()]], {
factory (id, container, dependencies: DependencyDescriptor[]) {
const [anotherService] = dependencies;
assert(anotherService.id === AnotherService);
assert(anotherService.constraints & Optional());
}
});

Type Parameters

  • T = unknown

Hierarchy

  • DependencyDescriptor

Properties

Properties

constraints?: number

The constraints of the given service, if any.

The identifier of the declared dependency.

Generated using TypeDoc