parent
71b8b355a6
commit
b9f0720c95
|
@ -71,10 +71,23 @@ export function injectInjectorOnly<T>(
|
||||||
/**
|
/**
|
||||||
* Generated instruction: Injects a token from the currently active injector.
|
* Generated instruction: Injects a token from the currently active injector.
|
||||||
*
|
*
|
||||||
* WARNING: This function is meant to be generated by the Ivy compiler, and is not meant for
|
* Must be used in the context of a factory function such as one defined for an
|
||||||
* developer consumption!
|
* `InjectionToken`. Throws an error if not called from such a context.
|
||||||
*
|
*
|
||||||
* https://github.com/angular/angular/blob/master/packages/core/src/render3/DELTA_INSTRUCTIONS.md
|
* (Additional documentation moved to `inject`, as it is the public API, and an alias for this instruction)
|
||||||
|
*
|
||||||
|
* @see inject
|
||||||
|
* @codeGenApi
|
||||||
|
*/
|
||||||
|
export function ɵɵinject<T>(token: Type<T>| InjectionToken<T>): T;
|
||||||
|
export function ɵɵinject<T>(token: Type<T>| InjectionToken<T>, flags?: InjectFlags): T|null;
|
||||||
|
export function ɵɵinject<T>(token: Type<T>| InjectionToken<T>, flags = InjectFlags.Default): T|
|
||||||
|
null {
|
||||||
|
return (_injectImplementation || injectInjectorOnly)(token, flags);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Injects a token from the currently active injector.
|
||||||
*
|
*
|
||||||
* Must be used in the context of a factory function such as one defined for an
|
* Must be used in the context of a factory function such as one defined for an
|
||||||
* `InjectionToken`. Throws an error if not called from such a context.
|
* `InjectionToken`. Throws an error if not called from such a context.
|
||||||
|
@ -97,17 +110,6 @@ export function injectInjectorOnly<T>(
|
||||||
*
|
*
|
||||||
* @publicApi
|
* @publicApi
|
||||||
*/
|
*/
|
||||||
export function ɵɵinject<T>(token: Type<T>| InjectionToken<T>): T;
|
|
||||||
export function ɵɵinject<T>(token: Type<T>| InjectionToken<T>, flags?: InjectFlags): T|null;
|
|
||||||
export function ɵɵinject<T>(token: Type<T>| InjectionToken<T>, flags = InjectFlags.Default): T|
|
|
||||||
null {
|
|
||||||
return (_injectImplementation || injectInjectorOnly)(token, flags);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @deprecated in v8, delete after v10. This API should be used only be generated code, and that
|
|
||||||
* code should now use ɵɵinject instead.
|
|
||||||
* @publicApi
|
|
||||||
*/
|
|
||||||
export const inject = ɵɵinject;
|
export const inject = ɵɵinject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -383,7 +383,6 @@ export interface HostListenerDecorator {
|
||||||
new (eventName: string, args?: string[]): any;
|
new (eventName: string, args?: string[]): any;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @deprecated */
|
|
||||||
export declare const inject: typeof ɵɵinject;
|
export declare const inject: typeof ɵɵinject;
|
||||||
|
|
||||||
export interface Inject {
|
export interface Inject {
|
||||||
|
|
Loading…
Reference in New Issue