diff --git a/packages/compiler-cli/src/ngtsc/diagnostics/index.ts b/packages/compiler-cli/src/ngtsc/diagnostics/index.ts index 58513e7c934..4ff58490a23 100644 --- a/packages/compiler-cli/src/ngtsc/diagnostics/index.ts +++ b/packages/compiler-cli/src/ngtsc/diagnostics/index.ts @@ -6,7 +6,8 @@ * found in the LICENSE file at https://angular.io/license */ -export {COMPILER_ERRORS_WITH_GUIDES, ERROR_DETAILS_PAGE_BASE_URL} from './src/docs'; +export {COMPILER_ERRORS_WITH_GUIDES} from './src/docs'; export {FatalDiagnosticError, isFatalDiagnosticError, makeDiagnostic, makeRelatedInformation} from './src/error'; export {ErrorCode} from './src/error_code'; +export {ERROR_DETAILS_PAGE_BASE_URL} from './src/error_details_base_url'; export {ngErrorCode, replaceTsWithNgInErrors} from './src/util'; diff --git a/packages/compiler-cli/src/ngtsc/diagnostics/src/docs.ts b/packages/compiler-cli/src/ngtsc/diagnostics/src/docs.ts index 28c0a90dae0..46f3866c57e 100644 --- a/packages/compiler-cli/src/ngtsc/diagnostics/src/docs.ts +++ b/packages/compiler-cli/src/ngtsc/diagnostics/src/docs.ts @@ -8,13 +8,6 @@ import {ErrorCode} from './error_code'; -/** - * Base URL for the error details page. - * Keep this value in sync with a similar const in - * `packages/core/src/render3/error_code.ts`. - */ -export const ERROR_DETAILS_PAGE_BASE_URL = 'https://angular.io/errors'; - /** * Contains a set of error messages that have detailed guides at angular.io. * Full list of available error guides can be found at https://angular.io/errors diff --git a/packages/compiler-cli/src/ngtsc/diagnostics/src/error_details_base_url.ts b/packages/compiler-cli/src/ngtsc/diagnostics/src/error_details_base_url.ts new file mode 100644 index 00000000000..7f059401189 --- /dev/null +++ b/packages/compiler-cli/src/ngtsc/diagnostics/src/error_details_base_url.ts @@ -0,0 +1,16 @@ +/** + * @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.io/license + */ + +/** + * Base URL for the error details page. + * + * Keep the files below in full sync: + * - packages/compiler-cli/src/ngtsc/diagnostics/src/error_details_base_url.ts + * - packages/core/src/render3/error_details_base_url.ts + */ +export const ERROR_DETAILS_PAGE_BASE_URL = 'https://angular.io/errors'; diff --git a/packages/core/src/render3/error_code.ts b/packages/core/src/render3/error_code.ts index 700d5eded38..13710348101 100644 --- a/packages/core/src/render3/error_code.ts +++ b/packages/core/src/render3/error_code.ts @@ -6,10 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -// Base URL for the error details page. -// Keep this value in sync with a similar const in -// `packages/compiler-cli/src/ngtsc/diagnostics/src/docs.ts`. -const ERROR_DETAILS_PAGE_BASE_URL = 'https://angular.io/errors'; +import {ERROR_DETAILS_PAGE_BASE_URL} from './error_details_base_url'; export const enum RuntimeErrorCode { // Internal Errors diff --git a/packages/core/src/render3/error_details_base_url.ts b/packages/core/src/render3/error_details_base_url.ts new file mode 100644 index 00000000000..7f059401189 --- /dev/null +++ b/packages/core/src/render3/error_details_base_url.ts @@ -0,0 +1,16 @@ +/** + * @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.io/license + */ + +/** + * Base URL for the error details page. + * + * Keep the files below in full sync: + * - packages/compiler-cli/src/ngtsc/diagnostics/src/error_details_base_url.ts + * - packages/core/src/render3/error_details_base_url.ts + */ +export const ERROR_DETAILS_PAGE_BASE_URL = 'https://angular.io/errors';