Optionalname: stringInjects the value associated with the given token,
or undefined if the token is not registered in the container.
Throws an error if a circular dependency is detected. Use optionalBy when you need to resolve circular dependencies.
Injects the instance associated with the given class, or
undefinedif the class is not registered in the container.Throws an error if a circular dependency is detected. Use optionalBy when you need to resolve circular dependencies.