infinyon / node-bindgen

Easy way to write Node.js module using Rust
Apache License 2.0
507 stars 43 forks source link

Consider undefined/null for optional rust types (close #278) #280

Closed DmitryAstafyev closed 9 months ago

DmitryAstafyev commented 9 months ago

Before parsing value from JS and converting it into rust-type, checking for null / undefined and consider it as Option<T>

DmitryAstafyev commented 9 months ago

related to #278

morenol commented 9 months ago

@DmitryAstafyev can you rebase on #281 is merged?

Can we add a new test/example for this case?

DmitryAstafyev commented 9 months ago

@DmitryAstafyev can you rebase on #281 is merged?

Can we add a new test/example for this case?

done

DmitryAstafyev commented 9 months ago

@morenol tests are green )

DmitryAstafyev commented 9 months ago

@morenol

Can we add a new test/example for this case?

Sorry, missed this question. I guess, yes... give me a try

DmitryAstafyev commented 9 months ago

@morenol test has been added. Test has been passed ) we are green