mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 20:38:52 +00:00
feat(native): NotifyEvent types
This commit is contained in:
@@ -122,8 +122,9 @@ impl FSWatcher {
|
||||
#[napi]
|
||||
pub fn subscribe(
|
||||
&mut self,
|
||||
#[napi(ts_arg_type = "(event: import('./event').NotifyEvent) => void")]
|
||||
callback: ThreadsafeFunction<serde_json::Value, ErrorStrategy::Fatal>,
|
||||
error_callback: Option<ThreadsafeFunction<()>>,
|
||||
#[napi(ts_arg_type = "(err: Error) => void")] error_callback: Option<ThreadsafeFunction<()>>,
|
||||
) -> Subscription {
|
||||
let uuid = uuid::Uuid::new_v4();
|
||||
let mut event_emitter = self.event_emitter.lock();
|
||||
|
||||
Reference in New Issue
Block a user