From 0f1de356040a212e9ce9aa163b0523a213d1c6e8 Mon Sep 17 00:00:00 2001 From: Peter Mihalik Date: Wed, 27 Jun 2018 22:08:48 +0200 Subject: [PATCH] docs(core): rephrase doc for Injector.get (#24670) PR Close #24670 --- packages/core/src/di/injector.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/core/src/di/injector.ts b/packages/core/src/di/injector.ts index 00fdf4817b..c404a0b1bd 100644 --- a/packages/core/src/di/injector.ts +++ b/packages/core/src/di/injector.ts @@ -60,10 +60,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(token: Type|InjectionToken, notFoundValue?: T, flags?: InjectFlags): T; /**