napi-rs/examples
Louis 43415251b8
feat(napi): allow Reference as a class method param (#1966)
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.
2024-02-22 22:37:50 +08:00
..
binary feat(cli): brand new cli tool with both cli and programmatical usage (#1492) 2023-04-06 11:04:53 +08:00
napi feat(napi): allow Reference as a class method param (#1966) 2024-02-22 22:37:50 +08:00
napi-compat-mode chore: upgrade all dependencies (#1933) 2024-02-01 12:14:56 +08:00
napi-shared fix(napi-derive,cli): register function cross crates (#1848) 2023-12-11 00:36:26 +08:00
tsconfig.json Introduce #[napi] procedural macro to automation development boilerplate (#696) 2021-09-23 01:29:09 +08:00