UNPKG

841 BTypeScriptView Raw
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.dev/license
7 */
8import { ErrorCode } from './error_code';
9/**
10 * During formatting of `ts.Diagnostic`s, the numeric code of each diagnostic is prefixed with the
11 * hard-coded "TS" prefix. For Angular's own error codes, a prefix of "NG" is desirable. To achieve
12 * this, all Angular error codes start with "-99" so that the sequence "TS-99" can be assumed to
13 * correspond with an Angular specific error code. This function replaces those occurrences with
14 * just "NG".
15 *
16 * @param errors The formatted diagnostics
17 */
18export declare function replaceTsWithNgInErrors(errors: string): string;
19export declare function ngErrorCode(code: ErrorCode): number;