https://github.com/angular/angular
Raw File
Tip revision: e726a63cdd17588ce53fb7eeaf829995ef941cc0 authored by Andrew Scott on 08 September 2021, 16:28:03 UTC
release: cut the v12.2.5 release (#43392)
Tip revision: e726a63
injector_token.ts
/**
 * @license
 * Copyright Google LLC 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
 */

import {InjectionToken} from './injection_token';
import {Injector} from './injector';
import {InjectorMarkers} from './injector_marker';



/**
 * An InjectionToken that gets the current `Injector` for `createInjector()`-style injectors.
 *
 * Requesting this token instead of `Injector` allows `StaticInjector` to be tree-shaken from a
 * project.
 *
 * @publicApi
 */
export const INJECTOR = new InjectionToken<Injector>(
    'INJECTOR',
    // Dissable tslint because this is const enum which gets inlined not top level prop access.
    // tslint:disable-next-line: no-toplevel-property-access
    InjectorMarkers.Injector as any,  // Special value used by Ivy to identify `Injector`.
);
back to top