From f224c3c8fc4cc65e044edef8e1d546e431dd46bf Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Wed, 13 May 2026 07:21:45 +0200 Subject: [PATCH] chore(developer): update fast-xml-parser type references Test-bot: skip --- developer/src/common/web/utils/src/xml-utils.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/developer/src/common/web/utils/src/xml-utils.ts b/developer/src/common/web/utils/src/xml-utils.ts index 5ef3b55ec9..f60d1dbad2 100644 --- a/developer/src/common/web/utils/src/xml-utils.ts +++ b/developer/src/common/web/utils/src/xml-utils.ts @@ -6,7 +6,7 @@ * Abstraction for XML reading and writing */ -import { XMLParser, XMLBuilder, XmlBuilderOptions, X2jOptions } from 'fast-xml-parser'; +import { XMLParser, XMLBuilder, XmlBuilderOptions, X2jOptions, JPathOrMatcher } from 'fast-xml-parser'; export type KeymanXMLType = 'keyboard3' // LDML @@ -27,9 +27,9 @@ const PARSER_COMMON_OPTIONS: X2jOptions = { ignoreAttributes: false, ignorePiTags: true, numberParseOptions: { // TODO: query is this option really necessary? - eNotation: null, - hex: null, - leadingZeros: null, + eNotation: false, + hex: false, + leadingZeros: false, skipLike: /(?:)/, // parse numbers as strings }, textNodeName: '_', @@ -66,7 +66,7 @@ const PARSER_OPTIONS: KeymanXMLParserOptionsBag = { }, 'kvks': { ...PARSER_COMMON_OPTIONS, - tagValueProcessor: (_tagName: string, tagValue: string, _jPath: string, _hasAttributes: boolean, isLeafNode: boolean) : string | undefined => { + tagValueProcessor: (_tagName: string, tagValue: string, _jPathOrMatcher: JPathOrMatcher, _hasAttributes: boolean, isLeafNode: boolean) : unknown => { if (!isLeafNode) { return tagValue?.trim(); // trimmed value } else {