refactor(compiler-cli): fix typo

Fixes a typo in the name of `OutOfBandDiagnosticCategory`.
This commit is contained in:
Kristiyan Kostadinov 2026-04-10 09:34:06 +02:00 committed by Kirill Cherkashin
parent b5b8631198
commit 65bf054ee4
4 changed files with 12 additions and 12 deletions

View file

@ -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';

View file

@ -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<T> {
*/
controlFlowPreventingContentProjection(
id: TypeCheckId,
category: OutOfBadDiagnosticCategory,
category: OutOfBandDiagnosticCategory,
projectionNode: TmplAstElement | TmplAstTemplate,
componentName: string,
slotSelector: string,

View file

@ -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;
}
}

View file

@ -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;