docs(core): rephrase doc for Injector.get (#24670)

PR Close #24670
This commit is contained in:
Peter Mihalik 2018-06-27 22:08:48 +02:00 committed by Misko Hevery
parent 9803cb011e
commit 87ddbdf919
1 changed files with 2 additions and 4 deletions

View File

@ -64,10 +64,8 @@ export abstract class Injector {
/**
* Retrieves an instance from the injector based on the provided token.
* If not found:
* - Throws an error if no `notFoundValue` that is not equal to
* Injector.THROW_IF_NOT_FOUND is given
* - Returns the `notFoundValue` otherwise
* @returns The instance from the injector if defined, otherwise the `notFoundValue`.
* @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.
*/
abstract get<T>(token: Type<T>|InjectionToken<T>, notFoundValue?: T, flags?: InjectFlags): T;
/**