refactor(compiler): rename diagnostics/src/code.ts to diagnostics/src/error_code.ts (#35067)
the new filename is less ambiguous and better reflects the name of the symbol defined in it. PR Close #35067
This commit is contained in:
@ -6,6 +6,6 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
export {ErrorCode, ngErrorCode} from './src/code';
|
||||
export {FatalDiagnosticError, isFatalDiagnosticError, makeDiagnostic} from './src/error';
|
||||
export {ErrorCode, ngErrorCode} from './src/error_code';
|
||||
export {replaceTsWithNgInErrors} from './src/util';
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
import * as ts from 'typescript';
|
||||
|
||||
import {ErrorCode} from './code';
|
||||
import {ErrorCode} from './error_code';
|
||||
|
||||
export class FatalDiagnosticError {
|
||||
constructor(readonly code: ErrorCode, readonly node: ts.Node, readonly message: string) {}
|
||||
|
@ -6,6 +6,9 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @publicApi
|
||||
*/
|
||||
export enum ErrorCode {
|
||||
DECORATOR_ARG_NOT_LITERAL = 1001,
|
||||
DECORATOR_ARITY_WRONG = 1002,
|
||||
@ -125,6 +128,9 @@ export enum ErrorCode {
|
||||
INJECTABLE_DUPLICATE_PROV = 9001,
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
export function ngErrorCode(code: ErrorCode): number {
|
||||
return parseInt('-99' + code);
|
||||
}
|
Reference in New Issue
Block a user