mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
Previously if the code is invalid the error message might look like:
```
Unexpected messageParts for `$localize` (expected an array of strings).
```
This is not very helpful for debugging where the problem occurs.
Now we build a "code-frame" description to give more useful information:
```
TypeError: Cannot create property 'message' on string '.../src/app/app.component.js:
Unexpected messageParts for `$localize` (expected an array of strings).
4 | export class AppComponent {
5 | constructor() {
> 6 | this.title = $localize(a = ['myapp'], []);
| ^^^^^^^^^^^^^
7 | }
8 | }
```
PR Close #40724
|
||
|---|---|---|
| .. | ||
| init | ||
| schematics | ||
| src | ||
| test | ||
| BUILD.bazel | ||
| index.ts | ||
| localize.ts | ||
| package.json | ||
| private.ts | ||