diff --git a/packages/localize/src/tools/src/extract/main.ts b/packages/localize/src/tools/src/extract/main.ts index 27d50f6212..646fab708e 100644 --- a/packages/localize/src/tools/src/extract/main.ts +++ b/packages/localize/src/tools/src/extract/main.ts @@ -208,7 +208,7 @@ export function extractTranslations({ export function getSerializer( format: string, sourceLocale: string, rootPath: AbsoluteFsPath, useLegacyIds: boolean, - formatOptions: FormatOptions): TranslationSerializer { + formatOptions: FormatOptions = {}): TranslationSerializer { switch (format) { case 'xlf': case 'xlif': diff --git a/packages/localize/src/tools/src/extract/translation_files/xliff1_translation_serializer.ts b/packages/localize/src/tools/src/extract/translation_files/xliff1_translation_serializer.ts index f56a4addf2..6ff7643f13 100644 --- a/packages/localize/src/tools/src/extract/translation_files/xliff1_translation_serializer.ts +++ b/packages/localize/src/tools/src/extract/translation_files/xliff1_translation_serializer.ts @@ -27,7 +27,7 @@ const LEGACY_XLIFF_MESSAGE_LENGTH = 40; export class Xliff1TranslationSerializer implements TranslationSerializer { constructor( private sourceLocale: string, private basePath: AbsoluteFsPath, private useLegacyIds: boolean, - private formatOptions: FormatOptions) { + private formatOptions: FormatOptions = {}) { validateOptions('Xliff1TranslationSerializer', [['xml:space', ['preserve']]], formatOptions); } diff --git a/packages/localize/src/tools/src/extract/translation_files/xliff2_translation_serializer.ts b/packages/localize/src/tools/src/extract/translation_files/xliff2_translation_serializer.ts index 395e4c1bbe..d01fd63662 100644 --- a/packages/localize/src/tools/src/extract/translation_files/xliff2_translation_serializer.ts +++ b/packages/localize/src/tools/src/extract/translation_files/xliff2_translation_serializer.ts @@ -27,7 +27,7 @@ export class Xliff2TranslationSerializer implements TranslationSerializer { private currentPlaceholderId = 0; constructor( private sourceLocale: string, private basePath: AbsoluteFsPath, private useLegacyIds: boolean, - private formatOptions: FormatOptions) { + private formatOptions: FormatOptions = {}) { validateOptions('Xliff1TranslationSerializer', [['xml:space', ['preserve']]], formatOptions); }