43415251b8
As of before this commit, there was a lock in the codegen preventing Reference from being used as a function argument outside of a Reference<Self>. This changes it, allowing Reference of any class to be added as a class method argument anywhere. It has the same limitations as reference, as in it requires the class to have been created with a factory or constructor. This change implements FromNapiValue on Reference, which will unwrap the class and call the existing from_value_ptr method. It also updated typegen so that we only emit the reference type if we're in an impl block that doesn't match the Reference we're getting. This ensures that typegen works as expected with the previous behaviour. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |
napi-derive-backend
Take care the ast parsing from napi-derive
and generate "bridge" runtime code for both nodejs and rust.