mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
refactor(compiler-cli): fix typo
Fixes a typo in the name of `OutOfBandDiagnosticCategory`.
This commit is contained in:
parent
b5b8631198
commit
65bf054ee4
4 changed files with 12 additions and 12 deletions
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue