(token: PrimitivesInjectionToken<T>, options?: unknown)
| 244 | } |
| 245 | |
| 246 | retrieve<T>(token: PrimitivesInjectionToken<T>, options?: unknown): T | NotFound { |
| 247 | const flags: InternalInjectFlags = |
| 248 | convertToBitFlags(options as InjectOptions | undefined) || InternalInjectFlags.Default; |
| 249 | try { |
| 250 | return (this as BackwardsCompatibleInjector).get( |
| 251 | token as unknown as InjectionToken<T>, |
| 252 | // When a dependency is requested with an optional flag, DI returns null as the default value. |
| 253 | THROW_IF_NOT_FOUND as T, |
| 254 | flags, |
| 255 | ); |
| 256 | } catch (e: any) { |
| 257 | if (isNotFound(e)) { |
| 258 | return e; |
| 259 | } |
| 260 | throw e; |
| 261 | } |
| 262 | } |
| 263 | |
| 264 | /** |
| 265 | * Destroy the injector and release references to every instance or provider associated with it. |
nothing calls this directly
no test coverage detected