
Occasionally a factory function needs to be generated for an "invalid" constructor (one with parameters types which aren't injectable). Typically this happens in JIT mode where understanding of parameters cannot be done in the same "up-front" way that the AOT compiler can. This commit changes the JIT compiler to generate a new `invalidFactoryDep` call for each invalid parameter. This instruction will error at runtime if called, indicating both the index of the invalid parameter as well as (via the stack trace) the factory function which was generated for the type being constructed. Fixes #33637 PR Close #33739
27 lines
1.3 KiB
TypeScript
27 lines
1.3 KiB
TypeScript
/**
|
|
* @license
|
|
* Copyright Google Inc. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
* found in the LICENSE file at https://angular.io/license
|
|
*/
|
|
|
|
/**
|
|
* @module
|
|
* @description
|
|
* The `di` module provides dependency injection container services.
|
|
*/
|
|
|
|
export * from './metadata';
|
|
export {InjectFlags} from './interface/injector';
|
|
export {ɵɵdefineInjectable, defineInjectable, ɵɵdefineInjector, InjectableType, InjectorType} from './interface/defs';
|
|
export {forwardRef, resolveForwardRef, ForwardRefFn} from './forward_ref';
|
|
export {Injectable, InjectableDecorator, InjectableProvider} from './injectable';
|
|
export {Injector} from './injector';
|
|
export {ɵɵinject, inject, INJECTOR, ɵɵinvalidFactoryDep} from './injector_compatibility';
|
|
export {ReflectiveInjector} from './reflective_injector';
|
|
export {ClassProvider, ClassSansProvider, ConstructorProvider, ConstructorSansProvider, ExistingProvider, ExistingSansProvider, FactoryProvider, FactorySansProvider, Provider, StaticClassProvider, StaticClassSansProvider, StaticProvider, TypeProvider, ValueProvider, ValueSansProvider} from './interface/provider';
|
|
export {ResolvedReflectiveFactory, ResolvedReflectiveProvider} from './reflective_provider';
|
|
export {ReflectiveKey} from './reflective_key';
|
|
export {InjectionToken} from './injection_token';
|