diff --git a/packages/core/src/di/interface/defs.ts b/packages/core/src/di/interface/defs.ts index e25c4ed0b90615..b1d05df5b37760 100644 --- a/packages/core/src/di/interface/defs.ts +++ b/packages/core/src/di/interface/defs.ts @@ -217,8 +217,8 @@ function getOwnDefinition(type: any, def: ɵɵInjectableDef): ɵɵInjectab * * @param type A type which may have `ɵprov`, via inheritance. * - * @deprecated Will be removed in v10, where an error will occur in the scenario if we find the - * `ɵprov` on an ancestor only. + * @deprecated Will be removed in a future version of Angular, where an error will occur in the + * scenario if we find the `ɵprov` on an ancestor only. */ export function getInheritedInjectableDef(type: any): ɵɵInjectableDef|null { // See `jit/injectable.ts#compileInjectable` for context on NG_PROV_DEF_FALLBACK. @@ -233,7 +233,8 @@ export function getInheritedInjectableDef(type: any): ɵɵInjectableDef|nu console.warn( `DEPRECATED: DI is instantiating a token "${ typeName}" that inherits its @Injectable decorator but does not provide one itself.\n` + - `This will become an error in v10. Please add @Injectable() to the "${typeName}" class.`); + `This will become an error in a future version of Angular. Please add @Injectable() to the "${ + typeName}" class.`); return def; } else { return null; diff --git a/packages/core/src/di/jit/injectable.ts b/packages/core/src/di/jit/injectable.ts index 134df6154d6a6a..231f2090ecee9a 100644 --- a/packages/core/src/di/jit/injectable.ts +++ b/packages/core/src/di/jit/injectable.ts @@ -46,7 +46,7 @@ export function compileInjectable(type: Type, srcMeta?: Injectable): void { // undecorated parent class. We work around it by defining a method which should be used // as a fallback. This should only be a problem in JIT mode, because in AOT TypeScript // seems to have a workaround for static properties. When inheriting from an undecorated - // parent is no longer supported in v10, this can safely be removed. + // parent is no longer supported (v11 or later), this can safely be removed. if (!type.hasOwnProperty(NG_PROV_DEF_FALLBACK)) { (type as any)[NG_PROV_DEF_FALLBACK] = () => (type as any)[NG_PROV_DEF]; } diff --git a/packages/core/test/acceptance/di_spec.ts b/packages/core/test/acceptance/di_spec.ts index 32c472f65261c7..554a929e0e28e2 100644 --- a/packages/core/test/acceptance/di_spec.ts +++ b/packages/core/test/acceptance/di_spec.ts @@ -1030,7 +1030,7 @@ describe('di', () => { if (ivyEnabled) { expect(warnSpy).toHaveBeenCalledWith( `DEPRECATED: DI is instantiating a token "SubSubClass" that inherits its @Injectable decorator but does not provide one itself.\n` + - `This will become an error in v10. Please add @Injectable() to the "SubSubClass" class.`); + `This will become an error in a future version of Angular. Please add @Injectable() to the "SubSubClass" class.`); } }); @@ -1061,7 +1061,7 @@ describe('di', () => { if (ivyEnabled) { expect(warnSpy).toHaveBeenCalledWith( `DEPRECATED: DI is instantiating a token "MyRootService" that inherits its @Injectable decorator but does not provide one itself.\n` + - `This will become an error in v10. Please add @Injectable() to the "MyRootService" class.`); + `This will become an error in a future version of Angular. Please add @Injectable() to the "MyRootService" class.`); } });