(
protected _desc: string,
options?: {
providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;
factory: () => T;
},
)
| 94 | ); |
| 95 | |
| 96 | constructor( |
| 97 | protected _desc: string, |
| 98 | options?: { |
| 99 | providedIn?: Type<any> | 'root' | 'platform' | 'any' | null; |
| 100 | factory: () => T; |
| 101 | }, |
| 102 | ) { |
| 103 | this.ɵprov = undefined; |
| 104 | if (typeof options == 'number') { |
| 105 | (typeof ngDevMode === 'undefined' || ngDevMode) && |
| 106 | assertLessThan(options, 0, 'Only negative numbers are supported here'); |
| 107 | // This is a special hack to assign __NG_ELEMENT_ID__ to this instance. |
| 108 | // See `InjectorMarkers` |
| 109 | (this as any).__NG_ELEMENT_ID__ = options; |
| 110 | } else if (options !== undefined) { |
| 111 | this.ɵprov = ɵɵdefineInjectable({ |
| 112 | token: this, |
| 113 | providedIn: options.providedIn || 'root', |
| 114 | factory: options.factory, |
| 115 | }); |
| 116 | } |
| 117 | } |
| 118 | |
| 119 | /** |
| 120 | * @internal |
nothing calls this directly
no test coverage detected