UNPKG

libxslt-wasm

Version:

JavaScript bindings for libxslt compiled to WebAssembly

92 lines (86 loc) 7.75 kB
// TypeScript bindings for emscripten-generated code. Automatically generated at compile time. declare namespace RuntimeExports { let HEAPU8: Uint8Array; function ptrToString(ptr: any): string; function getNativeTypeSize(type: any): any; /** * Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the * emscripten HEAP, returns a copy of that string as a Javascript String object. * * @param {number} ptr * @param {number=} maxBytesToRead - An optional length that specifies the * maximum number of bytes to read. You can omit this parameter to scan the * string until the first 0 byte. If maxBytesToRead is passed, and the string * at [ptr, ptr+maxBytesToReadr[ contains a null byte in the middle, then the * string will cut short at that byte index. * @param {boolean=} ignoreNul - If true, the function will not stop on a NUL character. * @return {string} */ function UTF8ToString(ptr: number, maxBytesToRead?: number | undefined, ignoreNul?: boolean | undefined): string; function lengthBytesUTF8(str: any): number; function stringToNewUTF8(str: any): any; /** * @param {number} ptr * @param {string} type */ function getValue(ptr: number, type?: string): any; /** * @param {number} ptr * @param {number} value * @param {string} type */ function setValue(ptr: number, value: number, type?: string): void; } interface WasmModule { _exsltRegisterAll(): void; _exsltCommonRegister(): void; _exsltMathRegister(): void; _exsltSetsRegister(): void; _exsltFuncRegister(): void; _exsltStrRegister(): void; _exsltDateRegister(): void; _exsltSaxonRegister(): void; _exsltDynRegister(): void; _xsltFreeStylesheet(_0: number): void; _xsltParseStylesheetDoc(_0: number): Promise<number>; _xsltLoadStylesheetPI(_0: number): Promise<number>; _xsltSaveResultTo(_0: number, _1: number, _2: number): number; _xsltApplyStylesheet(_0: number, _1: number, _2: number): Promise<number>; _xmlReadDoc(_0: number, _1: number, _2: number, _3: number): number; _xmlReadFile(_0: number, _1: number, _2: number): Promise<number>; _xmlReadMemory(_0: number, _1: number, _2: number, _3: number, _4: number): Promise<number>; _xmlFreeDoc(_0: number): void; _xmlAllocOutputBuffer(_0: number): number; _xmlOutputBufferClose(_0: number): number; _xmlOutputBufferGetContent(_0: number): number; _xmlOutputBufferGetSize(_0: number): number; _xmlOutputBufferWriteString(_0: number, _1: number): number; _htmlDocContentDumpFormatOutput(_0: number, _1: number, _2: number, _3: number): void; _xmlNodeDumpOutput(_0: number, _1: number, _2: number, _3: number, _4: number, _5: number): void; _libxsltWasmExternalEntityLoader(_0: number, _1: number, _2: number): number; _malloc(_0: number): number; _free(_0: number): void; _realloc(_0: number, _1: number): number; _calloc(_0: number, _1: number): number; ___original_main(): number; _main(_0: number, _1: number): Promise<number>; } export interface xmlCharEncodingValue<T extends number> { value: T; } export type xmlCharEncoding = xmlCharEncodingValue<-1>|xmlCharEncodingValue<0>|xmlCharEncodingValue<1>|xmlCharEncodingValue<2>|xmlCharEncodingValue<3>|xmlCharEncodingValue<4>|xmlCharEncodingValue<5>|xmlCharEncodingValue<6>|xmlCharEncodingValue<7>|xmlCharEncodingValue<8>|xmlCharEncodingValue<9>|xmlCharEncodingValue<10>|xmlCharEncodingValue<11>|xmlCharEncodingValue<12>|xmlCharEncodingValue<13>|xmlCharEncodingValue<14>|xmlCharEncodingValue<15>|xmlCharEncodingValue<16>|xmlCharEncodingValue<17>|xmlCharEncodingValue<18>|xmlCharEncodingValue<19>|xmlCharEncodingValue<20>|xmlCharEncodingValue<21>|xmlCharEncodingValue<22>|xmlCharEncodingValue<23>|xmlCharEncodingValue<24>|xmlCharEncodingValue<25>|xmlCharEncodingValue<26>|xmlCharEncodingValue<27>|xmlCharEncodingValue<28>|xmlCharEncodingValue<29>|xmlCharEncodingValue<30>|xmlCharEncodingValue<31>; export interface xmlParserOptionValue<T extends number> { value: T; } export type xmlParserOption = xmlParserOptionValue<1>|xmlParserOptionValue<2>|xmlParserOptionValue<4>|xmlParserOptionValue<8>|xmlParserOptionValue<16>|xmlParserOptionValue<32>|xmlParserOptionValue<64>|xmlParserOptionValue<128>|xmlParserOptionValue<256>|xmlParserOptionValue<512>|xmlParserOptionValue<1024>|xmlParserOptionValue<2048>|xmlParserOptionValue<4096>|xmlParserOptionValue<8192>|xmlParserOptionValue<16384>|xmlParserOptionValue<32768>|xmlParserOptionValue<65536>|xmlParserOptionValue<131072>|xmlParserOptionValue<262144>|xmlParserOptionValue<524288>|xmlParserOptionValue<1048576>|xmlParserOptionValue<2097152>|xmlParserOptionValue<4194304>|xmlParserOptionValue<8388608>|xmlParserOptionValue<16777216>|xmlParserOptionValue<33554432>|xmlParserOptionValue<67108864>|xmlParserOptionValue<134217728>; export interface xmlParserStatusValue<T extends number> { value: T; } export type xmlParserStatus = xmlParserStatusValue<1>|xmlParserStatusValue<2>|xmlParserStatusValue<4>|xmlParserStatusValue<8>; interface EmbindModule { xmlCharEncoding: {ERROR: xmlCharEncodingValue<-1>, NONE: xmlCharEncodingValue<0>, UTF8: xmlCharEncodingValue<1>, UTF16LE: xmlCharEncodingValue<2>, UTF16BE: xmlCharEncodingValue<3>, UCS4LE: xmlCharEncodingValue<4>, UCS4BE: xmlCharEncodingValue<5>, EBCDIC: xmlCharEncodingValue<6>, UCS4_2143: xmlCharEncodingValue<7>, UCS4_3412: xmlCharEncodingValue<8>, UCS2: xmlCharEncodingValue<9>, ISO_8859_1: xmlCharEncodingValue<10>, ISO_8859_2: xmlCharEncodingValue<11>, ISO_8859_3: xmlCharEncodingValue<12>, ISO_8859_4: xmlCharEncodingValue<13>, ISO_8859_5: xmlCharEncodingValue<14>, ISO_8859_6: xmlCharEncodingValue<15>, ISO_8859_7: xmlCharEncodingValue<16>, ISO_8859_8: xmlCharEncodingValue<17>, ISO_8859_9: xmlCharEncodingValue<18>, ISO_2022_JP: xmlCharEncodingValue<19>, SHIFT_JIS: xmlCharEncodingValue<20>, EUC_JP: xmlCharEncodingValue<21>, ASCII: xmlCharEncodingValue<22>, UTF16: xmlCharEncodingValue<23>, HTML: xmlCharEncodingValue<24>, ISO_8859_10: xmlCharEncodingValue<25>, ISO_8859_11: xmlCharEncodingValue<26>, ISO_8859_13: xmlCharEncodingValue<27>, ISO_8859_14: xmlCharEncodingValue<28>, ISO_8859_15: xmlCharEncodingValue<29>, ISO_8859_16: xmlCharEncodingValue<30>, WINDOWS_1252: xmlCharEncodingValue<31>}; xmlParserOption: {RECOVER: xmlParserOptionValue<1>, NOENT: xmlParserOptionValue<2>, DTDLOAD: xmlParserOptionValue<4>, DTDATTR: xmlParserOptionValue<8>, DTDVALID: xmlParserOptionValue<16>, NOERROR: xmlParserOptionValue<32>, NOWARNING: xmlParserOptionValue<64>, PEDANTIC: xmlParserOptionValue<128>, NOBLANKS: xmlParserOptionValue<256>, SAX1: xmlParserOptionValue<512>, XINCLUDE: xmlParserOptionValue<1024>, NONET: xmlParserOptionValue<2048>, NODICT: xmlParserOptionValue<4096>, NSCLEAN: xmlParserOptionValue<8192>, NOCDATA: xmlParserOptionValue<16384>, NOXINCNODE: xmlParserOptionValue<32768>, COMPACT: xmlParserOptionValue<65536>, OLD10: xmlParserOptionValue<131072>, NOBASEFIX: xmlParserOptionValue<262144>, HUGE: xmlParserOptionValue<524288>, OLDSAX: xmlParserOptionValue<1048576>, IGNORE_ENC: xmlParserOptionValue<2097152>, BIG_LINES: xmlParserOptionValue<4194304>, NO_XXE: xmlParserOptionValue<8388608>, UNZIP: xmlParserOptionValue<16777216>, NO_SYS_CATALOG: xmlParserOptionValue<33554432>, CATALOG_PI: xmlParserOptionValue<67108864>, SKIP_IDS: xmlParserOptionValue<134217728>}; xmlParserStatus: {NOT_WELL_FORMED: xmlParserStatusValue<1>, NOT_NS_WELL_FORMED: xmlParserStatusValue<2>, DTD_VALIDATION_FAILED: xmlParserStatusValue<4>, CATASTROPHIC_ERROR: xmlParserStatusValue<8>}; } export type MainModule = WasmModule & typeof RuntimeExports & EmbindModule; export default function MainModuleFactory (options?: unknown): Promise<MainModule>;