You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When binding functions that return pointers (either raw or smart pointers) to a type or accept them as a argument, those values can be nullptr on the c++ side. We think that the TS bindings generated through --emit-tsd should respect this. For instance:
since C++'s nullptr is a valid input/output for foo1/2() and therefore the same counts for the JavaScript side.
Am I missing something?
Note that using std::optional<Foo> is not really an option because Foo is not necessarily a value type that can be copied around/easily wrapped into an optional.
When binding functions that return pointers (either raw or smart pointers) to a type or accept them as a argument, those values can be
nullptr
on the c++ side. We think that the TS bindings generated through--emit-tsd
should respect this. For instance:will emit the following TS bindings:
however I would have expected
since C++'s
nullptr
is a valid input/output for foo1/2() and therefore the same counts for the JavaScript side.Am I missing something?
Note that using
std::optional<Foo>
is not really an option becauseFoo
is not necessarily a value type that can be copied around/easily wrapped into an optional.Version of emscripten/emsdk:
The text was updated successfully, but these errors were encountered: