Open klntsky opened 6 months ago
Hi @klntsky ! From wasm bingen side it is correct behavior, because as_*
functions returns Result
type it means you always get a non-nullable value or get an exception. In other words Result
means for bingen return value or throw an exception.
Yes it is not the best logic for an as_*
function but it is open source project and you can contribute. But changing from Result
to Option
leads API breaking changes and we can accept this change only for the next major version
as_*
methods should returnX | void
(they are all partial)