@@ -57,33 +57,33 @@ declare global {
57
57
* @param test - The test criterion to apply. Positional arguments are the value, the index of iteration, and the set being tested.
58
58
* @returns Does every element in the set satisfy the test criterion?
59
59
*/
60
- every ( test : ( value : T , index : number , set : Set < T > ) => boolean ) : boolean ;
60
+ every ( /** @immediate */ test : ( value : T , index : number , set : Set < T > ) => boolean ) : boolean ;
61
61
62
62
/**
63
63
* Filter this set to create a subset of elements which satisfy a certain test criterion.
64
64
* @see {@link Array#filter }
65
65
* @param test - The test criterion to apply. Positional arguments are the value, the index of iteration, and the set being filtered.
66
66
* @returns A new Set containing only elements which satisfy the test criterion.
67
67
*/
68
- filter < F extends T > ( test : ( value : T , index : number , set : Set < T > ) => value is F ) : Set < F > ;
69
- filter ( test : ( value : T , index : number , set : Set < T > ) => boolean ) : Set < T > ;
68
+ filter < F extends T > ( /** @immediate */ test : ( value : T , index : number , set : Set < T > ) => value is F ) : Set < F > ;
69
+ filter ( /** @immediate */ test : ( value : T , index : number , set : Set < T > ) => boolean ) : Set < T > ;
70
70
71
71
/**
72
72
* Find the first element in this set which satisfies a certain test criterion.
73
73
* @see {@link Array#find }
74
74
* @param test - The test criterion to apply. Positional arguments are the value, the index of iteration, and the set being searched.
75
75
* @returns The first element in the set which satisfies the test criterion, or undefined.
76
76
*/
77
- find < F extends T > ( test : ( value : T , index : number , set : Set < T > ) => value is F ) : F | undefined ;
78
- find ( test : ( value : T , index : number , set : Set < T > ) => boolean ) : T | undefined ;
77
+ find < F extends T > ( /** @immediate */ test : ( value : T , index : number , set : Set < T > ) => value is F ) : F | undefined ;
78
+ find ( /** @immediate */ test : ( value : T , index : number , set : Set < T > ) => boolean ) : T | undefined ;
79
79
80
80
/**
81
81
* Create a new Set where every element is modified by a provided transformation function.
82
82
* @see {@link Array#map }
83
83
* @param transform - The transformation function to apply.Positional arguments are the value, the index of iteration, and the set being transformed.
84
84
* @returns A new Set of equal size containing transformed elements.
85
85
*/
86
- map < V > ( transform : ( value : T , index : number , set : Set < T > ) => V ) : Set < V > ;
86
+ map < V > ( /** @immediate */ transform : ( value : T , index : number , set : Set < T > ) => V ) : Set < V > ;
87
87
88
88
/**
89
89
* Create a new Set with elements that are filtered and transformed by a provided reducer function.
@@ -92,14 +92,17 @@ declare global {
92
92
* @param accumulator - The initial value of the returned accumulator.
93
93
* @returns The final value of the accumulator.
94
94
*/
95
- reduce < V > ( reducer : ( accumulator : V , value : T , index : number , set : Set < T > ) => V , accumulator : V ) : V ;
95
+ reduce < V > (
96
+ /** @immediate */ reducer : ( accumulator : V , value : T , index : number , set : Set < T > ) => V ,
97
+ accumulator : V ,
98
+ ) : V ;
96
99
97
100
/**
98
101
* Test whether any element in this Set satisfies a certain test criterion.
99
102
* @see {@link Array#some }
100
103
* @param test - The test criterion to apply. Positional arguments are the value, the index of iteration, and the set being tested.
101
104
* @returns Does any element in the set satisfy the test criterion?
102
105
*/
103
- some ( test : ( value : T , index : number , set : Set < T > ) => boolean ) : boolean ;
106
+ some ( /** @immediate */ test : ( value : T , index : number , set : Set < T > ) => boolean ) : boolean ;
104
107
}
105
108
}
0 commit comments