Skip to content

Commit

Permalink
feat: RefSharedSignalEq, SharedSignalEq, GenSignalEq, GenSignalHookEq
Browse files Browse the repository at this point in the history
  • Loading branch information
EqualMa committed Jul 22, 2024
1 parent 1043f69 commit 88aec42
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
3 changes: 3 additions & 0 deletions packages/hooks/src/gen_signal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,9 @@ hooks_core::impl_hook!(
}
);

pub type GenSignalEq<T> = crate::SignalEq<GenSignal<T>>;
pub type GenSignalHookEq<T> = crate::SignalEq<GenSignalHook<T>>;

#[cfg(feature = "ShareValue")]
#[cfg(feature = "futures-core")]
#[cfg(test)]
Expand Down
7 changes: 4 additions & 3 deletions packages/hooks/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ pub use shared_ref::{
mod shared_signal;
#[cfg(feature = "use_shared_signal")]
pub use shared_signal::{
SharedSignal, UseSharedSignal, UseSharedSignal as use_shared_signal, UseSharedSignalWith,
RefSharedSignalEq, SharedSignal, SharedSignalEq, UseSharedSignal,
UseSharedSignal as use_shared_signal, UseSharedSignalWith,
UseSharedSignalWith as use_shared_signal_with,
};

Expand All @@ -66,8 +67,8 @@ pub use gen_ref::{
mod gen_signal;
#[cfg(feature = "use_gen_signal")]
pub use gen_signal::{
GenSignal, GenSignalHook, UseGenSignal, UseGenSignal as use_gen_signal, UseGenSignalWith,
UseGenSignalWith as use_gen_signal_with,
GenSignal, GenSignalEq, GenSignalHook, GenSignalHookEq, UseGenSignal,
UseGenSignal as use_gen_signal, UseGenSignalWith, UseGenSignalWith as use_gen_signal_with,
};

#[cfg(feature = "use_state_with_updater")]
Expand Down
3 changes: 3 additions & 0 deletions packages/hooks/src/shared_signal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ hooks_core::impl_hook![
}
];

pub type SharedSignalEq<T> = crate::SignalEq<SharedSignal<T>>;
pub type RefSharedSignalEq<'a, T> = crate::SignalEq<&'a SharedSignal<T>>;

#[cfg(feature = "ShareValue")]
#[cfg(feature = "futures-core")]
#[cfg(test)]
Expand Down

0 comments on commit 88aec42

Please sign in to comment.