From 65bf054ee4dbbc0f1445dc67a0b27e56ee2a5c2e Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Fri, 10 Apr 2026 09:34:06 +0200 Subject: [PATCH] refactor(compiler-cli): fix typo Fixes a typo in the name of `OutOfBandDiagnosticCategory`. --- packages/compiler-cli/private/hybrid_analysis.ts | 2 +- packages/compiler-cli/src/ngtsc/typecheck/api/oob.ts | 4 ++-- packages/compiler-cli/src/ngtsc/typecheck/src/oob.ts | 10 +++++----- .../src/ngtsc/typecheck/src/ops/content_projection.ts | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/compiler-cli/private/hybrid_analysis.ts b/packages/compiler-cli/private/hybrid_analysis.ts index 2364286f866..ee2769dc18d 100644 --- a/packages/compiler-cli/private/hybrid_analysis.ts +++ b/packages/compiler-cli/private/hybrid_analysis.ts @@ -21,7 +21,7 @@ export { type OutOfBandDiagnosticRecorder, type DomSchemaChecker, type SymbolReference, - OutOfBadDiagnosticCategory, + OutOfBandDiagnosticCategory, SymbolKind, } from '../src/ngtsc/typecheck/api'; export {RegistryDomSchemaChecker} from '../src/ngtsc/typecheck/src/dom'; diff --git a/packages/compiler-cli/src/ngtsc/typecheck/api/oob.ts b/packages/compiler-cli/src/ngtsc/typecheck/api/oob.ts index 23d80d82f39..df88c1fb1fb 100644 --- a/packages/compiler-cli/src/ngtsc/typecheck/api/oob.ts +++ b/packages/compiler-cli/src/ngtsc/typecheck/api/oob.ts @@ -32,7 +32,7 @@ import { import {TcbDirectiveMetadata, TypeCheckId} from './api'; /** Categories of diagnostics that can be reported by a `OutOfBandDiagnosticRecorder`. */ -export enum OutOfBadDiagnosticCategory { +export enum OutOfBandDiagnosticCategory { Error, Warning, } @@ -151,7 +151,7 @@ export interface OutOfBandDiagnosticRecorder { */ controlFlowPreventingContentProjection( id: TypeCheckId, - category: OutOfBadDiagnosticCategory, + category: OutOfBandDiagnosticCategory, projectionNode: TmplAstElement | TmplAstTemplate, componentName: string, slotSelector: string, diff --git a/packages/compiler-cli/src/ngtsc/typecheck/src/oob.ts b/packages/compiler-cli/src/ngtsc/typecheck/src/oob.ts index cd7be5b68c8..1ba20bf0dd6 100644 --- a/packages/compiler-cli/src/ngtsc/typecheck/src/oob.ts +++ b/packages/compiler-cli/src/ngtsc/typecheck/src/oob.ts @@ -35,7 +35,7 @@ import ts from 'typescript'; import {ErrorCode, ngErrorCode} from '../../diagnostics'; import { - OutOfBadDiagnosticCategory, + OutOfBandDiagnosticCategory, OutOfBandDiagnosticRecorder, TcbDirectiveMetadata, TemplateDiagnostic, @@ -422,7 +422,7 @@ export class OutOfBandDiagnosticRecorderImpl implements OutOfBandDiagnosticRecor controlFlowPreventingContentProjection( id: TypeCheckId, - category: OutOfBadDiagnosticCategory, + category: OutOfBandDiagnosticCategory, projectionNode: TmplAstElement | TmplAstTemplate, componentName: string, slotSelector: string, @@ -727,11 +727,11 @@ export class OutOfBandDiagnosticRecorderImpl implements OutOfBandDiagnosticRecor } } -function translateCategory(category: OutOfBadDiagnosticCategory): ts.DiagnosticCategory { +function translateCategory(category: OutOfBandDiagnosticCategory): ts.DiagnosticCategory { switch (category) { - case OutOfBadDiagnosticCategory.Error: + case OutOfBandDiagnosticCategory.Error: return ts.DiagnosticCategory.Error; - case OutOfBadDiagnosticCategory.Warning: + case OutOfBandDiagnosticCategory.Warning: return ts.DiagnosticCategory.Warning; } } diff --git a/packages/compiler-cli/src/ngtsc/typecheck/src/ops/content_projection.ts b/packages/compiler-cli/src/ngtsc/typecheck/src/ops/content_projection.ts index cffa186592e..6586204783f 100644 --- a/packages/compiler-cli/src/ngtsc/typecheck/src/ops/content_projection.ts +++ b/packages/compiler-cli/src/ngtsc/typecheck/src/ops/content_projection.ts @@ -24,7 +24,7 @@ import { } from '@angular/compiler'; import {TcbOp} from './base'; import {Context} from './context'; -import {OutOfBadDiagnosticCategory} from '../../api'; +import {OutOfBandDiagnosticCategory} from '../../api'; /** * A `TcbOp` that finds and flags control flow nodes that interfere with content projection. @@ -39,7 +39,7 @@ import {OutOfBadDiagnosticCategory} from '../../api'; * flow node didn't exist. */ export class TcbControlFlowContentProjectionOp extends TcbOp { - private readonly category: OutOfBadDiagnosticCategory; + private readonly category: OutOfBandDiagnosticCategory; constructor( private tcb: Context, @@ -53,8 +53,8 @@ export class TcbControlFlowContentProjectionOp extends TcbOp { // this check won't be enabled for `suppress`. this.category = tcb.env.config.controlFlowPreventingContentProjection === 'error' - ? OutOfBadDiagnosticCategory.Error - : OutOfBadDiagnosticCategory.Warning; + ? OutOfBandDiagnosticCategory.Error + : OutOfBandDiagnosticCategory.Warning; } override readonly optional = false;