feat(core): improve in-memory validation, FatturaPA detection coverage, and published type compatibility
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user