docs(core): remove v10 mention from @Injectable warning (#37383)
In v9, we started showing a console warning when instantiating a token that inherited its @Injectable decorator rather than providing its own. This warning said that the pattern would become an error in v10. However, we have decided to wait until at least v11 to throw in this case, so this commit updates the warning to be less prescriptive about the exact version when the pattern will no longer be supported. PR Close #37383
This commit is contained in:

committed by
Matias Niemelä

parent
561c0f81a0
commit
17e98198f4
@ -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.`);
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user