mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor(compiler): incorrect spelling in for loop parse error message (#59289)
'parameter' was spelled as 'paramater'. Fix spelling error in Update r3_control_flow.ts 'parameter' was spelled as 'paramater'. Fix spelling error in r3_template_transform_spec.ts 'parameter' was spelled as 'paramater'. PR Close #59289
This commit is contained in:
committed by
Jessica Janiuk
parent
aa835da9a2
commit
e5866eed2e
@@ -386,7 +386,7 @@ function parseForLoopParameters(
|
||||
}
|
||||
|
||||
errors.push(
|
||||
new ParseError(param.sourceSpan, `Unrecognized @for loop paramater "${param.expression}"`),
|
||||
new ParseError(param.sourceSpan, `Unrecognized @for loop parameter "${param.expression}"`),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -614,7 +614,7 @@ function parseConditionalBlockParameters(
|
||||
errors.push(
|
||||
new ParseError(
|
||||
param.sourceSpan,
|
||||
`Unrecognized conditional paramater "${param.expression}"`,
|
||||
`Unrecognized conditional parameter "${param.expression}"`,
|
||||
),
|
||||
);
|
||||
} else if (block.name !== 'if') {
|
||||
|
||||
@@ -1979,7 +1979,7 @@ describe('R3 template transform', () => {
|
||||
|
||||
it('should report unrecognized for loop parameters', () => {
|
||||
expect(() => parse(`@for (a of b; foo bar) {hello}`)).toThrowError(
|
||||
/Unrecognized @for loop paramater "foo bar"/,
|
||||
/Unrecognized @for loop parameter "foo bar"/,
|
||||
);
|
||||
});
|
||||
|
||||
@@ -2257,7 +2257,7 @@ describe('R3 template transform', () => {
|
||||
parse(`
|
||||
@if (foo; bar) {hello}
|
||||
`),
|
||||
).toThrowError(/Unrecognized conditional paramater "bar"/);
|
||||
).toThrowError(/Unrecognized conditional parameter "bar"/);
|
||||
});
|
||||
|
||||
it('should report an unknown parameter in an else if block', () => {
|
||||
@@ -2265,7 +2265,7 @@ describe('R3 template transform', () => {
|
||||
parse(`
|
||||
@if (foo) {hello} @else if (bar; baz) {goodbye}
|
||||
`),
|
||||
).toThrowError(/Unrecognized conditional paramater "baz"/);
|
||||
).toThrowError(/Unrecognized conditional parameter "baz"/);
|
||||
});
|
||||
|
||||
it('should report an if block that has multiple `as` expressions', () => {
|
||||
|
||||
Reference in New Issue
Block a user