File tree Expand file tree Collapse file tree 5 files changed +10
-12
lines changed Expand file tree Collapse file tree 5 files changed +10
-12
lines changed Original file line number Diff line number Diff line change
1
+ export { type DeasyncIterized } ;
2
+
3
+ type DeasyncIterized < T > = T extends AsyncIterable < infer InnerVal > ? InnerVal : T ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- import { type ExtractAsyncIterValue } from './ExtractAsyncIterValue .js' ;
1
+ import { type DeasyncIterized } from './DeasyncIterized .js' ;
2
2
3
3
export { isAsyncIter } ;
4
4
5
- function isAsyncIter < T > ( input : T ) : input is T & AsyncIterable < ExtractAsyncIterValue < T > > {
5
+ function isAsyncIter < T > ( input : T ) : input is T & AsyncIterable < DeasyncIterized < T > > {
6
6
const inputAsAny = input as any ;
7
7
return typeof inputAsAny ?. [ Symbol . asyncIterator ] === 'function' ;
8
8
}
Original file line number Diff line number Diff line change 5
5
} from '../common/ReactAsyncIterable.js' ;
6
6
import { asyncIterSyncMap } from '../common/asyncIterSyncMap.js' ;
7
7
import { isAsyncIter } from '../common/isAsyncIter.js' ;
8
- import { type ExtractAsyncIterValue } from '../common/ExtractAsyncIterValue .js' ;
8
+ import { type DeasyncIterized } from '../common/DeasyncIterized .js' ;
9
9
import { type AsyncIterableSubject } from '../AsyncIterableSubject/index.js' ;
10
10
import { type useAsyncIter } from '../useAsyncIter/index.js' ; // eslint-disable-line @typescript-eslint/no-unused-vars
11
11
import { type Iterate } from '../Iterate/index.js' ; // eslint-disable-line @typescript-eslint/no-unused-vars
@@ -81,10 +81,10 @@ export { iterateFormatted };
81
81
function iterateFormatted < TIn , TRes > (
82
82
source : TIn ,
83
83
formatFn : (
84
- value : ExtractAsyncIterValue < TIn > | ( TIn extends AsyncIterableSubject < infer J > ? J : never ) ,
84
+ value : DeasyncIterized < TIn > | ( TIn extends AsyncIterableSubject < infer J > ? J : never ) ,
85
85
i : number
86
86
) => TRes
87
- ) : ReactAsyncIterable < ExtractAsyncIterValue < TIn > , TRes > &
87
+ ) : ReactAsyncIterable < DeasyncIterized < TIn > , TRes > &
88
88
( TIn extends AsyncIterableSubject < unknown >
89
89
? { value : AsyncIterableSubject < TRes > [ 'value' ] }
90
90
: { value : undefined } ) ;
Original file line number Diff line number Diff line change @@ -225,8 +225,8 @@ type IterationResult<TVal, TInitVal = undefined> = {
225
225
* Will appear `false` for any iterations thereafter and reset back every time the iteratee
226
226
* is changed to a new one.
227
227
*
228
- * Can be used in certain cases for displaying _"loading" states_ metaphorically similar to
229
- * a how a pending state of a promise is thought of.
228
+ * Can be used for displaying _"loading" states_ in many cases, metaphorically similar to
229
+ * a how promise's pending state is thought of.
230
230
*
231
231
* Is always `false` for any plain value given instead of an async iterable.
232
232
*/
@@ -279,5 +279,3 @@ type IterationResult<TVal, TInitVal = undefined> = {
279
279
}
280
280
) )
281
281
) ;
282
-
283
- type ___1 = { a : string } & never ;
You can’t perform that action at this time.
0 commit comments