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 if resolving circular dependencies is necessary.
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 if resolving circular dependencies is necessary.