feat(core): improve in-memory validation, FatturaPA detection coverage, and published type compatibility
This commit is contained in:
@@ -16,10 +16,15 @@ export class DecoderFactory {
|
||||
* Creates a decoder for the specified XML content
|
||||
* @param xml XML content to decode
|
||||
* @param skipValidation Whether to skip EN16931 validation
|
||||
* @param formatHint Optional pre-detected format to avoid re-detecting large XML inputs
|
||||
* @returns Appropriate decoder instance
|
||||
*/
|
||||
public static createDecoder(xml: string, skipValidation: boolean = false): BaseDecoder {
|
||||
const format = FormatDetector.detectFormat(xml);
|
||||
public static createDecoder(
|
||||
xml: string,
|
||||
skipValidation: boolean = false,
|
||||
formatHint?: InvoiceFormat,
|
||||
): BaseDecoder {
|
||||
const format = formatHint ?? FormatDetector.detectFormat(xml);
|
||||
|
||||
switch (format) {
|
||||
case InvoiceFormat.UBL:
|
||||
|
||||
Reference in New Issue
Block a user