[x] Have you included sample input, output, error, and expected output?
[x] Have you checked if you are using correct configuration?
Description
Both tagValueProcessor and attributeValueProcessor are declared as returning a string, but the function should allow returning the value as is (which is also the default).
Code
const xmlBuilder = new XMLBuilder({tagValueProcessor: (name, value) => value});
Output
Type '(name: string, value: unknown) => unknown' is not assignable to type '(name: string, value: unknown) => string'.
Type 'unknown' is not assignable to type 'string'.ts(2322)
fxp.d.ts(65, 3): The expected type comes from property 'tagValueProcessor' which is declared here on type 'Partial<XmlBuilderOptions>'
We're glad you find this project helpful. We'll try to address this issue ASAP. You can vist https://solothought.com to know recent features. Don't forget to star this repo.
Description
Both
tagValueProcessor
andattributeValueProcessor
are declared as returning a string, but the function should allow returning the value as is (which is also the default).Code
Output
expected data
No typescript error.
Would you like to work on this issue?