Skip to content

Commit 3e1baa5

Browse files
cexbrayatalxhub
authored andcommitted
fix(compiler-cli): typo in NG2026 message (#61325)
The newly introduced NG2026 error for selectorless components had a typo in its message. PR Close #61325
1 parent 895b671 commit 3e1baa5

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

packages/compiler-cli/src/ngtsc/annotations/component/src/handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ export class ComponentDecoratorHandler
797797
makeDiagnostic(
798798
ErrorCode.UNSUPPORTED_SELECTORLESS_COMPONENT_FIELD,
799799
(rawImports || rawDeferredImports)!,
800-
`Cannot use the "${rawImports === null ? 'deferredImports' : 'imports'}" field in a selectorless components`,
800+
`Cannot use the "${rawImports === null ? 'deferredImports' : 'imports'}" field in a selectorless component`,
801801
),
802802
);
803803
}

packages/compiler-cli/src/ngtsc/scope/src/selectorless_scope.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {ComponentScopeKind, ComponentScopeReader, SelectorlessScope} from './api
1313
import ts from 'typescript';
1414

1515
/**
16-
* Computes the scope for a selectorless components by looking at imports within the same
16+
* Computes the scope for a selectorless component by looking at imports within the same
1717
* file and resolving them to metadata.
1818
*/
1919
export class SelectorlessComponentScopeReader implements ComponentScopeReader {

packages/compiler-cli/test/ngtsc/selectorless_spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ runInEachFileSystem(() => {
288288
const diags = env.driveDiagnostics();
289289
expect(diags.length).toBe(1);
290290
expect(diags[0].messageText).toBe(
291-
'Cannot use the "imports" field in a selectorless components',
291+
'Cannot use the "imports" field in a selectorless component',
292292
);
293293
});
294294

@@ -313,7 +313,7 @@ runInEachFileSystem(() => {
313313
const diags = env.driveDiagnostics();
314314
expect(diags.length).toBe(1);
315315
expect(diags[0].messageText).toBe(
316-
'Cannot use the "deferredImports" field in a selectorless components',
316+
'Cannot use the "deferredImports" field in a selectorless component',
317317
);
318318
});
319319

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy