chore(y-octo): migrate away depracated JsExternal API (#12130)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **Refactor**
  - Updated usage of JavaScript interop types to newer API versions for improved compatibility and consistency.
  - Changed method and type signatures to use updated types in several areas.
  - Removed an unused constructor from one component.
  - Adjusted a method to use a different JavaScript array buffer type for update callbacks.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Brooooooklyn
2025-05-06 07:24:54 +00:00
parent 245db4e992
commit 83f7093144
4 changed files with 42 additions and 33 deletions
+5 -2
View File
@@ -1,4 +1,7 @@
use napi::{bindgen_prelude::Array as JsArray, Env, JsUnknown, ValueType};
use napi::{
bindgen_prelude::{Array as JsArray, Env, Unknown},
ValueType,
};
use y_octo::{Any, Array, Value};
use super::*;
@@ -104,7 +107,7 @@ impl YArray {
Ok((object, length)) => {
for i in 0..length {
if let Ok(any) = object
.get_element::<JsUnknown>(i)
.get_element::<Unknown>(i)
.and_then(get_any_from_js_unknown)
{
self