refactor(core): remove unnecessary cast (#41960)
The `as any` is no longer needed since `providedIn` can accept `'any'`. PR Close #41960
This commit is contained in:
parent
adc732decb
commit
d59f2b0d0c
@ -272,14 +272,13 @@ describe('processNgModuleDocs processor', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function simulates a TS AST node for the code:
|
* This function simulates a TypeScript AST node for the code:
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
* static ɵprov = ɵɵdefineInjectable({
|
* static ɵprov = ɵɵdefineInjectable({
|
||||||
* providedIn: 'xxxx',
|
* providedIn: 'xxxx',
|
||||||
* });
|
* });
|
||||||
* ```
|
* ```
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
function createSymbolWithProvider(providedIn) {
|
function createSymbolWithProvider(providedIn) {
|
||||||
const initializer = {
|
const initializer = {
|
||||||
|
@ -106,7 +106,7 @@ export abstract class Injector {
|
|||||||
/** @nocollapse */
|
/** @nocollapse */
|
||||||
static ɵprov = /** @pureOrBreakMyCode */ ɵɵdefineInjectable({
|
static ɵprov = /** @pureOrBreakMyCode */ ɵɵdefineInjectable({
|
||||||
token: Injector,
|
token: Injector,
|
||||||
providedIn: 'any' as any,
|
providedIn: 'any',
|
||||||
factory: () => ɵɵinject(INJECTOR),
|
factory: () => ɵɵinject(INJECTOR),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user