MCPcopy Create free account
hub / github.com/angular/angular / ngErrorCode

Function ngErrorCode

packages/compiler-cli/src/ngtsc/diagnostics/src/util.ts:31–34  ·  view source on GitHub ↗
(code: ErrorCode)

Source from the content-addressed store, hash-verified

29}
30
31export function ngErrorCode(code: ErrorCode): number {
32 const absoluteCode = Math.abs(code);
33 return -(ERROR_CODE_MARKER * 10 ** decimalDigits(absoluteCode) + absoluteCode);
34}
35
36export function formatCompilerErrorCode(code: number): string {
37 return `NG${Math.abs(code)}`;

Calls 1

decimalDigitsFunction · 0.85

Tested by

no test coverage detected