mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
2916ac9e1a
This commit refactors the `RuntimeError` class to support a short version of providing error messages: ``` throw new RuntimeError( RuntimeErrorCode.INJECTOR_ALREADY_DESTROYED, ngDevMode && 'Injector has already been destroyed.'); ``` In prod mode, the second argument becomes `false` andn this commit extends the typings to support that. This commit also contains a couple places were the `RuntimeError` class is used to demostrate the compact form. PR Close #44783