feat(core): improve in-memory validation, FatturaPA detection coverage, and published type compatibility

This commit is contained in:
2026-04-16 20:30:56 +00:00
parent 55bee02a2e
commit 3f37f6538c
60 changed files with 5723 additions and 6678 deletions
@@ -6,17 +6,16 @@
import * as plugins from '../../plugins.js';
import type { EInvoice } from '../../einvoice.js';
import type { TAccountingDocItem } from '@tsclass/tsclass/dist_ts/finance/index.js';
import { DOMParser } from '@xmldom/xmldom';
/**
* Converter for XML formats to EInvoice - simplified version
* This is a basic converter that extracts essential fields for testing
*/
export class XMLToEInvoiceConverter {
private parser: DOMParser;
private parser: InstanceType<typeof plugins.DOMParser>;
constructor() {
this.parser = new DOMParser();
this.parser = new plugins.DOMParser();
}
/**
@@ -116,7 +115,7 @@ export class XMLToEInvoiceConverter {
console.warn('Error parsing XML:', error);
}
return mockInvoice as EInvoice;
return mockInvoice as unknown as EInvoice;
}
/**
@@ -139,4 +138,4 @@ export class XMLToEInvoiceConverter {
return null;
}
}
}