mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
c9541f4c49
Prior to this, the `@angular/localize/init` was added as a polyfill which caused the `@angular/localize` types not to be included in the TypeScript program which caused errors such as the below: ``` Error: src/app/app.component.ts:9:11 - error TS2304: Cannot find name '$localize'. ``` With the recent changes in the CLI (https://github.com/angular/angular-cli/pull/24032), adding `@angular/localize/init` as polyfil or in the `main.server.ts` is no longer necessary. Instead we add this as a TypeScript type. When users are running in JIT mode, we add `@angular/localize/init` as an additional entrypoint. This change also exposes the `$localize` method as a global when importing `@angular/localize`. Closes #47677 PR Close #47763
20 lines
477 B
Markdown
20 lines
477 B
Markdown
## API Report File for "@angular/localize_init"
|
|
|
|
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
|
|
```ts
|
|
|
|
import { ɵ$localize as $localize } from '@angular/localize';
|
|
import { ɵLocalizeFn as LocalizeFn } from '@angular/localize';
|
|
import { ɵTranslateFn as TranslateFn } from '@angular/localize';
|
|
|
|
export { $localize }
|
|
|
|
export { LocalizeFn }
|
|
|
|
export { TranslateFn }
|
|
|
|
// (No @packageDocumentation comment for this package)
|
|
|
|
```
|