chore(developer): update fast-xml-parser type references

Test-bot: skip
This commit is contained in:
Marc Durdin 2026-05-13 07:21:45 +02:00
parent c60c775895
commit f224c3c8fc

View file

@ -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 <keyboard3>
@ -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 {