diff --git a/src/library_browser.js b/src/library_browser.js index 5974db3ae17bb..8578137beebc0 100644 --- a/src/library_browser.js +++ b/src/library_browser.js @@ -54,6 +54,9 @@ var LibraryBrowser = { timingValue: 0, currentFrameNumber: 0, queue: [], +#if USE_CLOSURE_COMPILER + expectedBlockers: 0, +#endif pause() { Browser.mainLoop.scheduler = null; // Incrementing this signals the previous main loop that it's now become old, and it must return. @@ -628,7 +631,7 @@ var LibraryBrowser = { Browser.resizeListeners.forEach((listener) => listener(canvas.width, canvas.height)); }, - setCanvasSize(width, height, noUpdates) { + setCanvasSize(width, height, noUpdates = false) { var canvas = Module['canvas']; Browser.updateCanvasDimensions(canvas, width, height); if (!noUpdates) Browser.updateResizeListeners(); @@ -658,7 +661,7 @@ var LibraryBrowser = { Browser.updateResizeListeners(); }, - updateCanvasDimensions(canvas, wNative, hNative) { + updateCanvasDimensions(canvas, wNative = 0, hNative = 0) { if (wNative && hNative) { canvas.widthNative = wNative; canvas.heightNative = hNative; diff --git a/src/library_fs.js b/src/library_fs.js index 52ff96b435ca0..4b64f416110f1 100644 --- a/src/library_fs.js +++ b/src/library_fs.js @@ -51,7 +51,6 @@ FS.staticInit();` + devices: {}, streams: [], nextInode: 1, - nameTable: null, currentPath: '/', initialized: false, // Whether we are currently ignoring permissions. Useful when preparing the @@ -62,40 +61,10 @@ FS.staticInit();` + #if FS_DEBUG trackingDelegate: {}, #endif - ErrnoError: null, // set during init genericErrors: {}, filesystems: null, syncFSRequests: 0, // we warn if there are multiple in flight at once - -#if ASSERTIONS - ErrnoError: class extends Error { -#else - ErrnoError: class { -#endif - // We set the `name` property to be able to identify `FS.ErrnoError` - // - the `name` is a standard ECMA-262 property of error objects. Kind of good to have it anyway. - // - when using PROXYFS, an error can come from an underlying FS - // as different FS objects have their own FS.ErrnoError each, - // the test `err instanceof FS.ErrnoError` won't detect an error coming from another filesystem, causing bugs. - // we'll use the reliable test `err.name == "ErrnoError"` instead - constructor(errno) { -#if ASSERTIONS - super(ERRNO_MESSAGES[errno]); -#endif - // TODO(sbc): Use the inline member declaration syntax once we - // support it in acorn and closure. - this.name = 'ErrnoError'; - this.errno = errno; -#if ASSERTIONS - for (var key in ERRNO_CODES) { - if (ERRNO_CODES[key] === errno) { - this.code = key; - break; - } - } -#endif - } - }, + ErrnoError: ErrnoError, FSStream: class { constructor() { @@ -304,7 +273,7 @@ FS.staticInit();` + // if we failed to find it in the cache, call into the VFS return FS.lookup(parent, name); }, - createNode(parent, name, mode, rdev) { + createNode(parent, name, mode, rdev = 0) { #if ASSERTIONS assert(typeof parent == 'object') #endif @@ -673,13 +642,13 @@ FS.staticInit();` + return parent.node_ops.mknod(parent, name, mode, dev); }, // helpers to create specific types of nodes - create(path, mode) { + create(path, mode = undefined) { mode = mode !== undefined ? mode : 438 /* 0666 */; mode &= {{{ cDefs.S_IALLUGO }}}; mode |= {{{ cDefs.S_IFREG }}}; return FS.mknod(path, mode, 0); }, - mkdir(path, mode) { + mkdir(path, mode = undefined) { mode = mode !== undefined ? mode : 511 /* 0777 */; mode &= {{{ cDefs.S_IRWXUGO }}} | {{{ cDefs.S_ISVTX }}}; mode |= {{{ cDefs.S_IFDIR }}}; @@ -691,7 +660,7 @@ FS.staticInit();` + return FS.mknod(path, mode, 0); }, // Creates a whole directory tree chain if it doesn't yet exist - mkdirTree(path, mode) { + mkdirTree(path, mode = undefined) { var dirs = path.split('/'); var d = ''; for (var i = 0; i < dirs.length; ++i) { @@ -704,7 +673,7 @@ FS.staticInit();` + } } }, - mkdev(path, mode, dev) { + mkdev(path, mode, dev = undefined) { if (typeof dev == 'undefined') { dev = mode; mode = 438 /* 0666 */; @@ -912,7 +881,7 @@ FS.staticInit();` + } return PATH_FS.resolve(FS.getPath(link.parent), link.node_ops.readlink(link)); }, - stat(path, dontFollow) { + stat(path, dontFollow = false) { var lookup = FS.lookupPath(path, { follow: !dontFollow }); var node = lookup.node; if (!node) { @@ -926,7 +895,7 @@ FS.staticInit();` + lstat(path) { return FS.stat(path, true); }, - chmod(path, mode, dontFollow) { + chmod(path, mode, dontFollow = false) { var node; if (typeof path == 'string') { var lookup = FS.lookupPath(path, { follow: !dontFollow }); @@ -949,7 +918,7 @@ FS.staticInit();` + var stream = FS.getStreamChecked(fd); FS.chmod(stream.node, mode); }, - chown(path, uid, gid, dontFollow) { + chown(path, uid, gid, dontFollow = false) { var node; if (typeof path == 'string') { var lookup = FS.lookupPath(path, { follow: !dontFollow }); @@ -1015,7 +984,7 @@ FS.staticInit();` + timestamp: Math.max(atime, mtime) }); }, - open(path, flags, mode) { + open(path, flags, mode = undefined) { if (path === "") { throw new FS.ErrnoError({{{ cDefs.ENOENT }}}); } @@ -1193,7 +1162,7 @@ FS.staticInit();` + #endif return bytesRead; }, - write(stream, buffer, offset, length, position, canOwn) { + write(stream, buffer, offset, length, position = undefined, canOwn = false) { #if ASSERTIONS assert(offset >= 0); #endif @@ -1466,7 +1435,7 @@ FS.staticInit();` + #endif }; }, - init(input, output, error) { + init(input = undefined, output = undefined, error = undefined) { #if ASSERTIONS assert(!FS.init.initialized, 'FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)'); #endif @@ -1505,7 +1474,7 @@ FS.staticInit();` + } return ret.object; }, - analyzePath(path, dontResolveLastLink) { + analyzePath(path, dontResolveLastLink = false) { // operate from within the context of the symlink's target try { var lookup = FS.lookupPath(path, { follow: !dontResolveLastLink }); @@ -1576,7 +1545,7 @@ FS.staticInit();` + FS.chmod(node, mode); } }, - createDevice(parent, name, input, output) { + createDevice(parent, name, input, output = undefined) { var path = PATH.join2(typeof parent == 'string' ? parent : FS.getPath(parent), name); var mode = FS_getMode(!!input, !!output); if (!FS.createDevice.major) FS.createDevice.major = 64; diff --git a/src/library_fs_shared.js b/src/library_fs_shared.js index 6f92f1f77a813..c23d00c673171 100644 --- a/src/library_fs_shared.js +++ b/src/library_fs_shared.js @@ -4,6 +4,36 @@ * SPDX-License-Identifier: MIT */ +#if ASSERTIONS +class ErrnoError extends Error { +#else +class ErrnoError { +#endif + // We set the `name` property to be able to identify `FS.ErrnoError` + // - the `name` is a standard ECMA-262 property of error objects. Kind of good to have it anyway. + // - when using PROXYFS, an error can come from an underlying FS + // as different FS objects have their own FS.ErrnoError each, + // the test `err instanceof FS.ErrnoError` won't detect an error coming from another filesystem, causing bugs. + // we'll use the reliable test `err.name == "ErrnoError"` instead + constructor(errno) { +#if ASSERTIONS + super(ERRNO_MESSAGES[errno]); +#endif + // TODO(sbc): Use the inline member declaration syntax once we + // support it in acorn and closure. + this.name = 'ErrnoError'; + this.errno = errno; +#if ASSERTIONS + for (var key in ERRNO_CODES) { + if (ERRNO_CODES[key] === errno) { + this.code = key; + break; + } + } +#endif + } +} + addToLibrary({ $preloadPlugins: "{{{ makeModuleReceiveExpr('preloadPlugins', '[]') }}}", @@ -50,7 +80,7 @@ addToLibrary({ '$FS_handledByPreloadPlugin', #endif ], - $FS_createPreloadedFile: (parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn, preFinish) => { + $FS_createPreloadedFile: (parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn = false, preFinish = undefined) => { // TODO we should allow people to just pass in a complete filename instead // of parent and name being that we just join them anyways var fullname = name ? PATH_FS.resolve(PATH.join2(parent, name)) : parent; diff --git a/src/library_glemu.js b/src/library_glemu.js index 8d0b63a5ee614..cc08307158a5a 100644 --- a/src/library_glemu.js +++ b/src/library_glemu.js @@ -69,7 +69,6 @@ var LibraryGLEmulation = { fogStart: 0, fogEnd: 1, fogDensity: 1.0, - fogColor: null, fogMode: 0x800, // GL_EXP fogEnabled: false, @@ -2127,7 +2126,7 @@ var LibraryGLEmulation = { return renderer; }, - createRenderer(renderer) { + createRenderer() { var useCurrProgram = !!GL.currProgram; var hasTextures = false; for (var i = 0; i < GLImmediate.MAX_TEXTURES; i++) { @@ -2995,7 +2994,7 @@ var LibraryGLEmulation = { } }, - flush(numProvidedIndexes, startIndex = 0, ptr = 0) { + flush(numProvidedIndexes = 0, startIndex = 0, ptr = 0) { #if ASSERTIONS assert(numProvidedIndexes >= 0 || !numProvidedIndexes); #endif diff --git a/src/library_html5.js b/src/library_html5.js index c94748df8f347..17d2bee127917 100644 --- a/src/library_html5.js +++ b/src/library_html5.js @@ -94,8 +94,7 @@ var LibraryHTML5 = { return true; } // Test if the given call was already queued, and if so, don't add it again. - for (var i in JSEvents.deferredCalls) { - var call = JSEvents.deferredCalls[i]; + for (var call of JSEvents.deferredCalls) { if (call.targetFunction == targetFunction && arraysHaveEqualContent(call.argsList, argsList)) { return; } @@ -106,7 +105,10 @@ var LibraryHTML5 = { argsList }); - JSEvents.deferredCalls.sort((x,y) => x.precedence < y.precedence); + // sortcallback(x, y): + // A negative value indicates that x should come before y. + // A positive value indicates that x should come after y. + JSEvents.deferredCalls.sort((x,y) => y.precedence - x.precedence); }, // Erases all deferred calls to the given target function from the queue list. @@ -151,10 +153,9 @@ var LibraryHTML5 = { // Removes all event handlers on the given DOM element of the given type. // Pass in eventTypeString == undefined/null to remove all event handlers // regardless of the type. - removeAllHandlersOnTarget: (target, eventTypeString) => { + removeAllHandlersOnTarget: (target) => { for (var i = 0; i < JSEvents.eventHandlers.length; ++i) { - if (JSEvents.eventHandlers[i].target == target && - (!eventTypeString || eventTypeString == JSEvents.eventHandlers[i].eventTypeString)) { + if (JSEvents.eventHandlers[i].target) { JSEvents._removeHandler(i--); } } @@ -1512,9 +1513,6 @@ var LibraryHTML5 = { filteringMode: {{{ makeGetValue('fullscreenStrategy', C_STRUCTS.EmscriptenFullscreenStrategy.filteringMode, 'i32') }}}, canvasResizedCallback: {{{ makeGetValue('fullscreenStrategy', C_STRUCTS.EmscriptenFullscreenStrategy.canvasResizedCallback, 'i32') }}}, canvasResizedCallbackUserData: {{{ makeGetValue('fullscreenStrategy', C_STRUCTS.EmscriptenFullscreenStrategy.canvasResizedCallbackUserData, 'i32') }}}, -#if PTHREADS - canvasResizedCallbackTargetThread: JSEvents.getTargetThreadForEventCallback(), -#endif target, softFullscreen: true }; diff --git a/src/library_nodefs.js b/src/library_nodefs.js index d30c69815c133..00875a9183730 100644 --- a/src/library_nodefs.js +++ b/src/library_nodefs.js @@ -64,9 +64,9 @@ addToLibrary({ #if ASSERTIONS assert(ENVIRONMENT_IS_NODE); #endif - return NODEFS.createNode(null, '/', NODEFS.getMode(mount.opts.root), 0); + return NODEFS.createNode(null, '/', NODEFS.getMode(mount.opts.root)); }, - createNode(parent, name, mode, dev) { + createNode(parent, name, mode) { if (!FS.isDir(mode) && !FS.isFile(mode) && !FS.isLink(mode)) { throw new FS.ErrnoError({{{ cDefs.EINVAL }}}); } @@ -176,7 +176,7 @@ addToLibrary({ return NODEFS.createNode(parent, name, mode); }, mknod(parent, name, mode, dev) { - var node = NODEFS.createNode(parent, name, mode, dev); + var node = NODEFS.createNode(parent, name, mode); // create the backing node for this in the fs root as well var path = NODEFS.realPath(node); NODEFS.tryFSOperation(() => { @@ -277,7 +277,7 @@ addToLibrary({ return { ptr, allocated: true }; }, msync(stream, buffer, offset, length, mmapFlags) { - NODEFS.stream_ops.write(stream, buffer, 0, length, offset, false); + NODEFS.stream_ops.write(stream, buffer, 0, length, offset); // should we check if bytesWritten and length are the same? return 0; } diff --git a/src/library_openal.js b/src/library_openal.js index b39961cf3b788..33931d20180d5 100644 --- a/src/library_openal.js +++ b/src/library_openal.js @@ -103,7 +103,7 @@ var LibraryOpenAL = { // represents the queue of buffers scheduled for physical playback. These two queues are // distinct because of the differing semantics of OpenAL and web audio. Some changes // to OpenAL parameters, such as pitch, may require the web audio queue to be flushed and rescheduled. - scheduleSourceAudio: (src, lookahead) => { + scheduleSourceAudio: (src, lookahead = false) => { // See comment on scheduleContextAudio above. if (Browser.mainLoop.timingMode === {{{ cDefs.EM_TIMING_RAF }}} && document['visibilityState'] != 'visible') { return; diff --git a/src/library_sdl.js b/src/library_sdl.js index bb38f12db4463..5c9dd4599d6ed 100644 --- a/src/library_sdl.js +++ b/src/library_sdl.js @@ -106,18 +106,22 @@ var LibrarySDL = { audio: null, startTime: null, - initFlags: 0, // The flags passed to SDL_Init buttonState: 0, modState: 0, DOMButtons: [0, 0, 0], DOMEventToSDLEvent: {}, - TOUCH_DEFAULT_ID: 0, // Our default deviceID for touch events (we get nothing from the browser) + // Our default deviceID for touch events (we get nothing from the browser) + TOUCH_DEFAULT_ID: 0, +#if USE_CLOSURE_COMPILER eventHandler: null, - eventHandlerContext: null, + // The flags passed to SDL_Init + initFlags: 0, + eventHandlerContext: 0, eventHandlerTemp: 0, +#endif // DOM code ==> SDL code. See // https://developer.mozilla.org/en/Document_Object_Model_%28DOM%29/KeyboardEvent @@ -346,7 +350,7 @@ var LibrarySDL = { translateRGBAToColor: (r, g, b, a) => r | g << 8 | b << 16 | a << 24, - makeSurface(width, height, flags, usePageCanvas, source, rmask, gmask, bmask, amask) { + makeSurface(width, height, flags, usePageCanvas, source = 0, rmask = 0, gmask = 0, bmask = 0, amask = 0) { var is_SDL_HWSURFACE = flags & 0x00000001; var is_SDL_HWPALETTE = flags & 0x00200000; var is_SDL_OPENGL = flags & 0x04000000; @@ -438,7 +442,7 @@ var LibrarySDL = { // Copy data from the C++-accessible storage to the canvas backing // for surface with HWPALETTE flag(8bpp depth) - copyIndexedColorData(surfData, rX, rY, rW, rH) { + copyIndexedColorData(surfData) { // HWPALETTE works with palette // set by SDL_SetColors if (!surfData.colors) { @@ -448,10 +452,10 @@ var LibrarySDL = { var fullWidth = Module['canvas'].width; var fullHeight = Module['canvas'].height; - var startX = rX || 0; - var startY = rY || 0; - var endX = (rW || (fullWidth - startX)) + startX; - var endY = (rH || (fullHeight - startY)) + startY; + var startX = 0; + var startY = 0; + var endX = (fullWidth - startX) + startX; + var endY = (fullHeight - startY) + startY; var buffer = surfData.buffer; diff --git a/src/library_sockfs.js b/src/library_sockfs.js index 226fd7ab3bec0..f5870ed44dc87 100644 --- a/src/library_sockfs.js +++ b/src/library_sockfs.js @@ -140,7 +140,7 @@ addToLibrary({ // these functions aren't actually sock_ops members, but we're // abusing the namespace to organize them // - createPeer(sock, addr, port) { + createPeer(sock, addr, port = undefined) { var ws; if (typeof addr == 'object') { diff --git a/src/library_syscall.js b/src/library_syscall.js index 897d48c5a6f34..3282abee518ca 100644 --- a/src/library_syscall.js +++ b/src/library_syscall.js @@ -20,7 +20,7 @@ var SyscallsLibrary = { DEFAULT_POLLMASK: {{{ cDefs.POLLIN }}} | {{{ cDefs.POLLOUT }}}, // shared utilities - calculateAt(dirfd, path, allowEmpty) { + calculateAt(dirfd, path, allowEmpty = false) { if (PATH.isAbs(path)) { return path; } @@ -98,7 +98,7 @@ var SyscallsLibrary = { $syscallGetVarargI__internal: true, $syscallGetVarargI: function() { -#if ASSERTIONS +#if ASSERTIONS && !USE_CLOSURE_COMPILER assert(SYSCALLS.varargs != undefined); #endif // the `+` prepended here is necessary to convince the JSCompiler that varargs is indeed a number. @@ -113,7 +113,7 @@ var SyscallsLibrary = { $syscallGetVarargP__internal: true, #if MEMORY64 $syscallGetVarargP: function() { -#if ASSERTIONS +#if ASSERTIONS && !USE_CLOSURE_COMPILER assert(SYSCALLS.varargs != undefined); #endif var ret = {{{ makeGetValue('SYSCALLS.varargs', 0, '*') }}}; @@ -847,7 +847,7 @@ var SyscallsLibrary = { // we want to create b in the context of this function path = PATH.normalize(path); if (path[path.length-1] === '/') path = path.substr(0, path.length-1); - FS.mkdir(path, mode, 0); + FS.mkdir(path, mode); return 0; }, __syscall_mknodat: (dirfd, path, mode, dev) => { diff --git a/src/library_wasmfs.js b/src/library_wasmfs.js index 6440ebe7e3ba5..9ff590b424e6f 100644 --- a/src/library_wasmfs.js +++ b/src/library_wasmfs.js @@ -21,9 +21,6 @@ addToLibrary({ $wasmFSDevices: {}, $wasmFSDeviceStreams: {}, - $FS__postset: ` -FS.init(); -`, $FS__deps: [ '$MEMFS', '$wasmFSPreloadedFiles', @@ -70,14 +67,14 @@ FS.init(); 'wasmfs_create_jsimpl_backend', '$wasmFS$backends', '$wasmFSDevices', - '$wasmFSDeviceStreams' + '$wasmFSDeviceStreams', +#endif +#if ASSERTIONS + '$ERRNO_MESSAGES', '$ERRNO_CODES', #endif ], $FS : { - init() { - FS.ensureErrnoError(); - }, - ErrnoError: null, + ErrnoError: ErrnoError, handleError(returnValue) { // Assume errors correspond to negative returnValues // since some functions like _wasmfs_open() return positive @@ -88,16 +85,6 @@ FS.init(); return returnValue; }, - ensureErrnoError() { - if (FS.ErrnoError) return; - FS.ErrnoError = /** @this{Object} */ function ErrnoError(code) { - this.errno = code; - this.message = 'FS error'; - this.name = "ErrnoError"; - } - FS.ErrnoError.prototype = new Error(); - FS.ErrnoError.prototype.constructor = FS.ErrnoError; - }, createDataFile(parent, name, fileData, canRead, canWrite, canOwn) { FS_createDataFile(parent, name, fileData, canRead, canWrite, canOwn); }, @@ -118,7 +105,7 @@ FS.init(); return current; }, - createPreloadedFile(parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn, preFinish) { + createPreloadedFile(parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn = 0, preFinish = undefined) { return FS_createPreloadedFile(parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn, preFinish); }, @@ -173,8 +160,8 @@ FS.init(); // libc methods - mkdir: (path, mode) => FS_mkdir(path, mode), - mkdirTree: (path, mode) => FS_mkdirTree(path, mode), + mkdir: (path, mode = undefined) => FS_mkdir(path, mode), + mkdirTree: (path, mode = undefined) => FS_mkdirTree(path, mode), rmdir: (path) => FS.handleError( withStackSave(() => __wasmfs_rmdir(stringToUTF8OnStack(path))) ), diff --git a/src/library_webgpu.js b/src/library_webgpu.js index 5a849eb5141a7..5f5771fd340ad 100644 --- a/src/library_webgpu.js +++ b/src/library_webgpu.js @@ -969,8 +969,8 @@ var LibraryWebGPU = { if (viewFormatCount) { var viewFormatsPtr = {{{ makeGetValue('descriptor', C_STRUCTS.WGPUTextureDescriptor.viewFormats, '*') }}}; // viewFormatsPtr pointer to an array of TextureFormat which is an enum of size uint32_t - desc["viewFormats"] = Array.from({{{ makeHEAPView('32', 'viewFormatsPtr', `viewFormatsPtr + viewFormatCount * 4`) }}}, - function(format) { return WebGPU.TextureFormat[format]; }); + var heapView = {{{ makeHEAPView('32', 'viewFormatsPtr', `viewFormatsPtr + viewFormatCount * 4`) }}}; + desc["viewFormats"] = Array.from(heapView, /** @suppress {checkTypes} */ (format) => WebGPU.TextureFormat[format]); } var device = WebGPU.mgrDevice.get(deviceId); @@ -2570,8 +2570,8 @@ var LibraryWebGPU = { var requiredFeatureCount = {{{ gpu.makeGetU32('descriptor', C_STRUCTS.WGPUDeviceDescriptor.requiredFeatureCount) }}}; if (requiredFeatureCount) { var requiredFeaturesPtr = {{{ makeGetValue('descriptor', C_STRUCTS.WGPUDeviceDescriptor.requiredFeatures, '*') }}}; - desc["requiredFeatures"] = Array.from({{{ makeHEAPView('32', 'requiredFeaturesPtr', `requiredFeaturesPtr + requiredFeatureCount * ${POINTER_SIZE}`) }}}, - (feature) => WebGPU.FeatureName[feature]); + var heapView = {{{ makeHEAPView('32', 'requiredFeaturesPtr', `requiredFeaturesPtr + requiredFeatureCount * ${POINTER_SIZE}`) }}}; + desc["requiredFeatures"] = Array.from(heapView, /** @suppress {checkTypes} */ (feature) => WebGPU.FeatureName[feature]); } var requiredLimitsPtr = {{{ makeGetValue('descriptor', C_STRUCTS.WGPUDeviceDescriptor.requiredLimits, '*') }}}; if (requiredLimitsPtr) { diff --git a/src/shell.js b/src/shell.js index acd787ee1aac5..1267408ffd58a 100644 --- a/src/shell.js +++ b/src/shell.js @@ -341,8 +341,8 @@ if (ENVIRONMENT_IS_SHELL) { if (typeof scriptArgs != 'undefined') { arguments_ = scriptArgs; - } else if (typeof arguments != 'undefined') { - arguments_ = arguments; + } else if (typeof globalThis.arguments != 'undefined') { + arguments_ = globalThis.arguments; } if (typeof quit == 'function') { diff --git a/test/other/embind_tsgen_ignore_1.d.ts b/test/other/embind_tsgen_ignore_1.d.ts index ebd33b19da715..35be917099bc1 100644 --- a/test/other/embind_tsgen_ignore_1.d.ts +++ b/test/other/embind_tsgen_ignore_1.d.ts @@ -13,7 +13,7 @@ declare namespace RuntimeExports { let HEAPU64: any; let FS_createPath: any; function FS_createDataFile(parent: any, name: any, fileData: any, canRead: any, canWrite: any, canOwn: any): void; - function FS_createPreloadedFile(parent: any, name: any, url: any, canRead: any, canWrite: any, onload: any, onerror: any, dontCreateFile: any, canOwn: any, preFinish: any): void; + function FS_createPreloadedFile(parent: any, name: any, url: any, canRead: any, canWrite: any, onload: any, onerror: any, dontCreateFile: any, canOwn?: boolean, preFinish?: any): void; function FS_unlink(path: any): any; let FS_createLazyFile: any; let FS_createDevice: any;