mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 23:03:32 +00:00
* [deps] Autofill: Update prettier to v3 * prettier formatting updates --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jonathan Prusik <jprusik@classynemesis.com>
22 lines
843 B
TypeScript
22 lines
843 B
TypeScript
import { InjectFlags, InjectOptions, Injector, ProviderToken } from "@angular/core";
|
|
|
|
export class ModalInjector implements Injector {
|
|
constructor(
|
|
private _parentInjector: Injector,
|
|
private _additionalTokens: WeakMap<any, any>,
|
|
) {}
|
|
|
|
get<T>(
|
|
token: ProviderToken<T>,
|
|
notFoundValue: undefined,
|
|
options: InjectOptions & { optional?: false },
|
|
): T;
|
|
get<T>(token: ProviderToken<T>, notFoundValue: null, options: InjectOptions): T;
|
|
get<T>(token: ProviderToken<T>, notFoundValue?: T, options?: InjectOptions | InjectFlags): T;
|
|
get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;
|
|
get(token: any, notFoundValue?: any): any;
|
|
get(token: any, notFoundValue?: any, flags?: any): any {
|
|
return this._additionalTokens.get(token) ?? this._parentInjector.get<any>(token, notFoundValue);
|
|
}
|
|
}
|