@@ -10,9 +10,10 @@ declare namespace RuntimeExports {
1010 export let currentPath : string ;
1111 export let initialized : boolean ;
1212 export let ignorePermissions : boolean ;
13+ export { ErrnoError } ;
1314 export let filesystems : any ;
1415 export let syncFSRequests : number ;
15- export { ErrnoError } ;
16+ export let readFiles : { } ;
1617 export { FSStream } ;
1718 export { FSNode } ;
1819 export function lookupPath ( path : any , opts ?: { } ) : {
@@ -113,10 +114,11 @@ declare namespace RuntimeExports {
113114 export function llseek ( stream : any , offset : any , whence : any ) : any ;
114115 export function read ( stream : any , buffer : any , offset : any , length : any , position : any ) : any ;
115116 export function write ( stream : any , buffer : any , offset : any , length : any , position : any , canOwn : any ) : any ;
117+ export function allocate ( stream : any , offset : any , length : any ) : void ;
116118 export function mmap ( stream : any , length : any , position : any , prot : any , flags : any ) : any ;
117119 export function msync ( stream : any , buffer : any , offset : any , length : any , mmapFlags : any ) : any ;
118120 export function ioctl ( stream : any , cmd : any , arg : any ) : any ;
119- export function readFile ( path : any , opts ?: { } ) : Uint8Array < any > ;
121+ export function readFile ( path : any , opts ?: { } ) : any ;
120122 export function writeFile ( path : any , data : any , opts ?: { } ) : void ;
121123 export function cwd ( ) : any ;
122124 export function chdir ( path : any ) : void ;
@@ -150,10 +152,10 @@ declare namespace RuntimeExports {
150152 /**
151153 * @param {string|null= } returnType
152154 * @param {Array= } argTypes
153- * @param {Array= } args
155+ * @param {Arguments| Array= } args
154156 * @param {Object= } opts
155157 */
156- function ccall ( ident : any , returnType ?: ( string | null ) | undefined , argTypes ?: any [ ] | undefined , args ?: any [ ] | undefined , opts ?: any | undefined ) : any ;
158+ function ccall ( ident : any , returnType ?: ( string | null ) | undefined , argTypes ?: any [ ] | undefined , args ?: ( Arguments | any [ ] ) | undefined , opts ?: any | undefined ) : any ;
157159 /**
158160 * @param {string= } returnType
159161 * @param {Array= } argTypes
@@ -169,18 +171,31 @@ declare namespace RuntimeExports {
169171 * maximum number of bytes to read. You can omit this parameter to scan the
170172 * string until the first 0 byte. If maxBytesToRead is passed, and the string
171173 * at [ptr, ptr+maxBytesToReadr[ contains a null byte in the middle, then the
172- * string will cut short at that byte index.
173- * @param {boolean= } ignoreNul - If true, the function will not stop on a NUL character.
174+ * string will cut short at that byte index (i.e. maxBytesToRead will not
175+ * produce a string of exact length [ptr, ptr+maxBytesToRead[) N.B. mixing
176+ * frequent uses of UTF8ToString() with and without maxBytesToRead may throw
177+ * JS JIT optimizations off, so it is worth to consider consistently using one
174178 * @return {string }
175179 */
176- function UTF8ToString ( ptr : number , maxBytesToRead ?: number | undefined , ignoreNul ?: boolean | undefined ) : string ;
180+ function UTF8ToString ( ptr : number , maxBytesToRead ?: number | undefined ) : string ;
177181 function stringToNewUTF8 ( str : any ) : any ;
178182 /**
179183 * @param {number } ptr
180184 * @param {number } value
181185 * @param {string } type
182186 */
183187 function setValue ( ptr : number , value : number , type ?: string ) : void ;
188+ let HEAPF32 : any ;
189+ let HEAPF64 : any ;
190+ let HEAP_DATA_VIEW : any ;
191+ let HEAP8 : any ;
192+ let HEAPU8 : any ;
193+ let HEAP16 : any ;
194+ let HEAPU16 : any ;
195+ let HEAP32 : any ;
196+ let HEAPU32 : any ;
197+ let HEAP64 : any ;
198+ let HEAPU64 : any ;
184199}
185200declare class ErrnoError {
186201 constructor ( errno : any ) ;
@@ -232,8 +247,6 @@ export interface ClassHandle {
232247 delete ( ) : void ;
233248 deleteLater ( ) : this;
234249 isDeleted ( ) : boolean ;
235- // @ts -ignore - If targeting lower than ESNext, this symbol might not exist.
236- [ Symbol . dispose ] ( ) : void ;
237250 clone ( ) : this;
238251}
239252export interface Dwg_Version_TypeValue < T extends number > {
@@ -426,6 +439,7 @@ interface EmbindModule {
426439 dwg_dynapi_entity_set_value ( _0 : number , _1 : EmbindString , _2 : EmbindString , _3 : number , _4 : boolean ) : boolean ;
427440 dwg_dynapi_common_set_value ( _0 : number , _1 : EmbindString , _2 : number , _3 : boolean ) : boolean ;
428441 dwg_dynapi_handle_name ( _0 : number , _1 : number , _2 : number ) : string ;
442+ dwg_write_dxf ( _0 : EmbindString , _1 : EmbindString ) : number ;
429443 dwg_find_tablehandle ( _0 : number , _1 : EmbindString , _2 : EmbindString ) : number ;
430444 dwg_find_tablehandle_index ( _0 : number , _1 : number , _2 : EmbindString ) : number ;
431445 dwg_handle_name ( _0 : number , _1 : EmbindString , _2 : number ) : string ;
0 commit comments