From fc28b266cd342b2beb737cce478fd091a9e7cb60 Mon Sep 17 00:00:00 2001 From: Pete Bacon Darwin Date: Tue, 1 Oct 2019 14:46:38 +0100 Subject: [PATCH] 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 --- packages/compiler/src/render3/view/i18n/meta.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/compiler/src/render3/view/i18n/meta.ts b/packages/compiler/src/render3/view/i18n/meta.ts index f0f88e4d03..52c84a72ac 100644 --- a/packages/compiler/src/render3/view/i18n/meta.ts +++ b/packages/compiler/src/render3/view/i18n/meta.ts @@ -33,14 +33,12 @@ function setI18nRefs(html: html.Node & {i18n?: i18n.AST}, i18n: i18n.Node) { * stored with other element's and attribute's information. */ export class I18nMetaVisitor implements html.Visitor { - private _createI18nMessage: any; + // i18n message generation factory + private _createI18nMessage = createI18nMessageFactory(this.interpolationConfig); constructor( private interpolationConfig: InterpolationConfig = DEFAULT_INTERPOLATION_CONFIG, - private keepI18nAttrs: boolean = false) { - // i18n message generation factory - this._createI18nMessage = createI18nMessageFactory(interpolationConfig); - } + private keepI18nAttrs: boolean = false, private i18nLegacyMessageIdFormat: string = '') {} private _generateI18nMessage( nodes: html.Node[], meta: string|i18n.AST = '',