/
githubmirror
/
angular
Обзор
Документация
Войти
/
githubmirror
/
angular
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/common/src/directives/ng_optimized_image/asserts.ts
26 строк
877 B
Joey Perrott
refactor: update license text to point to angular.dev (#57901)
24 сен 2024, 16:33
24 сен 2024, 16:33
9dbe6fc
Код
Авторство
О чём код?
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {ɵRuntimeError as RuntimeError} from '@angular/core'; import {RuntimeErrorCode} from '../../errors'; /** * Asserts that the application is in development mode. Throws an error if the application is in * production mode. This assert can be used to make sure that there is no dev-mode code invoked in * the prod mode accidentally. */ export function assertDevMode(checkName: string) { if (!ngDevMode) { throw new RuntimeError( RuntimeErrorCode.UNEXPECTED_DEV_MODE_CHECK_IN_PROD_MODE, `Unexpected invocation of the ${checkName} in the prod mode. ` + `Please make sure that the prod mode is enabled for production builds.`, ); } }