refactor(compiler): clean up I18nMetaVisitor constructor (#32937)
The initialization of the `_createI18nMessage` property can be done where it is declared to avoid needing to type it as `any`. PR Close #32937
This commit is contained in:
parent
447fa2fccd
commit
fc28b266cd
|
@ -33,14 +33,12 @@ function setI18nRefs(html: html.Node & {i18n?: i18n.AST}, i18n: i18n.Node) {
|
||||||
* stored with other element's and attribute's information.
|
* stored with other element's and attribute's information.
|
||||||
*/
|
*/
|
||||||
export class I18nMetaVisitor implements html.Visitor {
|
export class I18nMetaVisitor implements html.Visitor {
|
||||||
private _createI18nMessage: any;
|
// i18n message generation factory
|
||||||
|
private _createI18nMessage = createI18nMessageFactory(this.interpolationConfig);
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private interpolationConfig: InterpolationConfig = DEFAULT_INTERPOLATION_CONFIG,
|
private interpolationConfig: InterpolationConfig = DEFAULT_INTERPOLATION_CONFIG,
|
||||||
private keepI18nAttrs: boolean = false) {
|
private keepI18nAttrs: boolean = false, private i18nLegacyMessageIdFormat: string = '') {}
|
||||||
// i18n message generation factory
|
|
||||||
this._createI18nMessage = createI18nMessageFactory(interpolationConfig);
|
|
||||||
}
|
|
||||||
|
|
||||||
private _generateI18nMessage(
|
private _generateI18nMessage(
|
||||||
nodes: html.Node[], meta: string|i18n.AST = '',
|
nodes: html.Node[], meta: string|i18n.AST = '',
|
||||||
|
|
Loading…
Reference in New Issue