feat(core): improve in-memory validation, FatturaPA detection coverage, and published type compatibility
This commit is contained in:
Vendored
+32
@@ -0,0 +1,32 @@
|
||||
declare module 'xmldom' {
|
||||
export class DOMParser {
|
||||
parseFromString(source: string, mimeType: string): Document;
|
||||
}
|
||||
|
||||
export class XMLSerializer {
|
||||
serializeToString(node: Node): string;
|
||||
}
|
||||
}
|
||||
|
||||
declare module 'pako' {
|
||||
export function inflate(input: Uint8Array | ArrayBuffer | string, options?: unknown): Uint8Array;
|
||||
}
|
||||
|
||||
declare module 'saxon-js' {
|
||||
export function compile(options: {
|
||||
stylesheetText: string;
|
||||
warnings?: string;
|
||||
[key: string]: unknown;
|
||||
}): Promise<unknown>;
|
||||
|
||||
export function transform(options: {
|
||||
stylesheetInternal?: unknown;
|
||||
sourceText: string;
|
||||
destination?: string;
|
||||
stylesheetParams?: Record<string, unknown>;
|
||||
[key: string]: unknown;
|
||||
}): Promise<{
|
||||
principalResult: string;
|
||||
[key: string]: unknown;
|
||||
}>;
|
||||
}
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
import * as pakoRuntime from 'pako';
|
||||
|
||||
export interface IPakoModule {
|
||||
inflate(input: Uint8Array | ArrayBuffer | string, options?: unknown): Uint8Array;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export const pako: IPakoModule = pakoRuntime as unknown as IPakoModule;
|
||||
Vendored
+28
@@ -0,0 +1,28 @@
|
||||
import * as saxonJSRuntime from 'saxon-js';
|
||||
|
||||
export interface ISaxonJSCompileOptions {
|
||||
stylesheetText: string;
|
||||
warnings?: string;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export interface ISaxonJSTransformOptions {
|
||||
stylesheetInternal?: unknown;
|
||||
sourceText: string;
|
||||
destination?: string;
|
||||
stylesheetParams?: Record<string, unknown>;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export interface ISaxonJSTransformResult {
|
||||
principalResult: string;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export interface ISaxonJSModule {
|
||||
compile(options: ISaxonJSCompileOptions): Promise<unknown>;
|
||||
transform(options: ISaxonJSTransformOptions): Promise<ISaxonJSTransformResult>;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export const SaxonJS: ISaxonJSModule = saxonJSRuntime as unknown as ISaxonJSModule;
|
||||
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
import * as xmldomRuntime from 'xmldom';
|
||||
|
||||
export interface IDOMParser {
|
||||
parseFromString(source: string, mimeType: string): Document;
|
||||
}
|
||||
|
||||
export interface IDOMParserConstructor {
|
||||
new (): IDOMParser;
|
||||
}
|
||||
|
||||
export interface IXMLSerializer {
|
||||
serializeToString(node: Node): string;
|
||||
}
|
||||
|
||||
export interface IXMLSerializerConstructor {
|
||||
new (): IXMLSerializer;
|
||||
}
|
||||
|
||||
export interface IXmlDomModule {
|
||||
DOMParser: IDOMParserConstructor;
|
||||
XMLSerializer: IXMLSerializerConstructor;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export const DOMParser: IDOMParserConstructor = xmldomRuntime.DOMParser as unknown as IDOMParserConstructor;
|
||||
export const XMLSerializer: IXMLSerializerConstructor = xmldomRuntime.XMLSerializer as unknown as IXMLSerializerConstructor;
|
||||
export const xmldom: IXmlDomModule = xmldomRuntime as unknown as IXmlDomModule;
|
||||
Reference in New Issue
Block a user