diff --git a/aio/tools/transforms/angular-api-package/processors/processNgModuleDocs.spec.js b/aio/tools/transforms/angular-api-package/processors/processNgModuleDocs.spec.js index 7c78c86744..bfe3f91f0e 100644 --- a/aio/tools/transforms/angular-api-package/processors/processNgModuleDocs.spec.js +++ b/aio/tools/transforms/angular-api-package/processors/processNgModuleDocs.spec.js @@ -272,25 +272,24 @@ 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({ * providedIn: 'xxxx', * }); * ``` - * */ function createSymbolWithProvider(providedIn) { const initializer = { pos: 0, end: providedIn.length, - getSourceFile() { + getSourceFile() { return { text: providedIn }; } }; - const valueDeclaration = { initializer: { arguments: [{ properties: [ { name: { text: 'providedIn' }, initializer } ] } ] } }; + const valueDeclaration = { initializer: { arguments: [{ properties: [{ name: { text: 'providedIn' }, initializer }] }] } }; const exportMap = new Map(); - exportMap.set('ɵprov', {valueDeclaration}); - return {exports: exportMap}; + exportMap.set('ɵprov', { valueDeclaration }); + return { exports: exportMap }; } \ No newline at end of file diff --git a/packages/core/src/di/injector.ts b/packages/core/src/di/injector.ts index a299d9a664..3d7646dfb5 100644 --- a/packages/core/src/di/injector.ts +++ b/packages/core/src/di/injector.ts @@ -106,7 +106,7 @@ export abstract class Injector { /** @nocollapse */ static ɵprov = /** @pureOrBreakMyCode */ ɵɵdefineInjectable({ token: Injector, - providedIn: 'any' as any, + providedIn: 'any', factory: () => ɵɵinject(INJECTOR), });