File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
packages/signals/signals-runtime/src/shared Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -8,11 +8,29 @@ export type SignalOfType<
88> = AllSignals & { type : SignalType }
99
1010export interface ISignalsRuntime < Signal extends BaseSignal > {
11+ /**
12+ * Finds a signal of a specific type from a given signal.
13+ *
14+ * @template SignalType - The type of the signal to find.
15+ * @param fromSignal - The signal to search from.
16+ * @param signalType - The type of the signal to find.
17+ * @param predicate - Optional predicate function to filter the signals.
18+ * @returns The found signal of the specified type, or undefined if not found.
19+ */
1120 find : < SignalType extends Signal [ 'type' ] > (
1221 fromSignal : Signal ,
1322 signalType : SignalType ,
1423 predicate ?: ( signal : SignalOfType < Signal , SignalType > ) => boolean
1524 ) => SignalOfType < Signal , SignalType > | undefined
25+
26+ /**
27+ * Filters signals of a specific type from a given signal.
28+ * @template SignalType - The type of the signals to filter.
29+ * @param fromSignal - The signal to search from.
30+ * @param signalType - The type of the signals to filter.
31+ * @param predicate - Optional predicate function to filter the signals.
32+ * @returns An array of signals of the specified type.
33+ */
1634 filter : < SignalType extends Signal [ 'type' ] > (
1735 fromSignal : Signal ,
1836 signalType : SignalType ,
You can’t perform that action at this time.
0 commit comments