mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-15 17:16:16 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user