function exposePublicSymbol(name, value, numArguments) {
    if (Module.hasOwnProperty(name)) {
        if (undefined === numArguments || (undefined !== Module[name].overloadTable && undefined !== Module[name].overloadTable[numArguments])) {
            throwBindingError("Cannot register public name '" + name + "' twice");
        }
        // We are exposing a function with the same name as an existing function. Create an overload table and a function selector
        // that routes between the two.
        ensureOverloadTable(Module, name, name);
        if (Module.hasOwnProperty(numArguments)) {
            throwBindingError("Cannot register multiple overloads of a function with the same number of arguments (" + numArguments + ")!");
        }
        // Add the new function into the overload table.
        Module[name].overloadTable[numArguments] = value;
    }
    else {
        Module[name] = value;
        if (undefined !== numArguments) {
            Module[name].numArguments = numArguments;
        }
    }
}
/* Registers a symbol (function, class, enum, ...) as part of the Module JS object so that
   hand-written code is able to access that symbol via 'Module.name'.
   name: The name of the symbol that's being exposed.
   value: The object itself to expose (function, class, ...)
   numArguments: For functions, specifies the number of arguments the function takes in. For other types, unused and undefined.
   To implement support for multiple overloads of a function, an 'overload selector' function is used. That selector function chooses
   the appropriate overload to call from an function overload table. This selector function is only used if multiple overloads are
   actually registered, since it carries a slight performance penalty. */
Registers a symbol (function, class, enum, ...) as part of the Module JS object so that
hand-written code is able to access that symbol via 'Module.name'.
name: The name of the symbol that's being exposed.
value: The object itself to expose (function, class, ...)
numArguments: For functions, specifies the number of arguments the function takes in. For other types, unused and undefined.
To implement support for multiple overloads of a function, an 'overload selector' function is used. That selector function chooses
the appropriate overload to call from an function overload table. This selector function is only used if multiple overloads are
actually registered, since it carries a slight performance penalty.
Registers a symbol ( function class enum ... ) as part of the Module JS object so that hand - written code is able to access that symbol via ' Module . name ' . name : The name of the symbol that ' s being exposed . value : The object itself to expose ( function class ... ) numArguments : For functions specifies the number of arguments the function takes in . For other types unused and undefined . To implement support for multiple overloads of a function an ' overload selector ' function is used . That selector function chooses the appropriate overload to call from an function overload table . This selector function is only used if multiple overloads are actually registered since it carries a slight performance penalty .
function exposePublicSymbol(name, value, numArguments) {
    if (Module.hasOwnProperty(name)) {
        if (undefined === numArguments || (undefined !== Module[name].overloadTable && undefined !== Module[name].overloadTable[numArguments])) {
            throwBindingError("Cannot register public name '" + name + "' twice");
        }
        ensureOverloadTable(Module, name, name);
        if (Module.hasOwnProperty(numArguments)) {
            throwBindingError("Cannot register multiple overloads of a function with the same number of arguments (" + numArguments + ")!");
        }
        Module[name].overloadTable[numArguments] = value;
    }
    else {
        Module[name] = value;
        if (undefined !== numArguments) {
            Module[name].numArguments = numArguments;
        }
    }
}
function exposePublicSymbol ( name , value , numArguments ) { if ( Module . hasOwnProperty ( name ) ) { if ( undefined === numArguments || ( undefined !== Module [ name ] . overloadTable && undefined !== Module [ name ] . overloadTable [ numArguments ] ) ) { throwBindingError ( "Cannot register public name '" + name + "' twice" ) ; } ensureOverloadTable ( Module , name , name ) ; if ( Module . hasOwnProperty ( numArguments ) ) { throwBindingError ( "Cannot register multiple overloads of a function with the same number of arguments (" + numArguments + ")!" ) ; } Module [ name ] . overloadTable [ numArguments ] = value ; } else { Module [ name ] = value ; if ( undefined !== numArguments ) { Module [ name ] . numArguments = numArguments ; } } }
Registers a symbol (function, class, enum, ...) as part of the Module JS object so that
hand-written code is able to access that symbol via 'Module.name'.
Registers a symbol ( function class enum ... ) as part of the Module JS object so that hand - written code is able to access that symbol via ' Module . name ' .
// We are exposing a function with the same name as an existing function. Create an overload table and a function selector // that routes between the two. // Add the new function into the overload table.