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' ;
22
33export { isAsyncIter } ;
44
5- function isAsyncIter < T > ( input : T ) : input is T & AsyncIterable < ExtractAsyncIterValue < T > > {
5+ function isAsyncIter < T > ( input : T ) : input is T & AsyncIterable < DeasyncIterized < T > > {
66 const inputAsAny = input as any ;
77 return typeof inputAsAny ?. [ Symbol . asyncIterator ] === 'function' ;
88}
Original file line number Diff line number Diff line change 55} from '../common/ReactAsyncIterable.js' ;
66import { asyncIterSyncMap } from '../common/asyncIterSyncMap.js' ;
77import { isAsyncIter } from '../common/isAsyncIter.js' ;
8- import { type ExtractAsyncIterValue } from '../common/ExtractAsyncIterValue .js' ;
8+ import { type DeasyncIterized } from '../common/DeasyncIterized .js' ;
99import { type AsyncIterableSubject } from '../AsyncIterableSubject/index.js' ;
1010import { type useAsyncIter } from '../useAsyncIter/index.js' ; // eslint-disable-line @typescript-eslint/no-unused-vars
1111import { type Iterate } from '../Iterate/index.js' ; // eslint-disable-line @typescript-eslint/no-unused-vars
@@ -81,10 +81,10 @@ export { iterateFormatted };
8181function iterateFormatted < TIn , TRes > (
8282 source : TIn ,
8383 formatFn : (
84- value : ExtractAsyncIterValue < TIn > | ( TIn extends AsyncIterableSubject < infer J > ? J : never ) ,
84+ value : DeasyncIterized < TIn > | ( TIn extends AsyncIterableSubject < infer J > ? J : never ) ,
8585 i : number
8686 ) => TRes
87- ) : ReactAsyncIterable < ExtractAsyncIterValue < TIn > , TRes > &
87+ ) : ReactAsyncIterable < DeasyncIterized < TIn > , TRes > &
8888 ( TIn extends AsyncIterableSubject < unknown >
8989 ? { value : AsyncIterableSubject < TRes > [ 'value' ] }
9090 : { value : undefined } ) ;
Original file line number Diff line number Diff line change @@ -225,8 +225,8 @@ type IterationResult<TVal, TInitVal = undefined> = {
225225 * Will appear `false` for any iterations thereafter and reset back every time the iteratee
226226 * is changed to a new one.
227227 *
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.
230230 *
231231 * Is always `false` for any plain value given instead of an async iterable.
232232 */
@@ -279,5 +279,3 @@ type IterationResult<TVal, TInitVal = undefined> = {
279279 }
280280 ) )
281281) ;
282-
283- type ___1 = { a : string } & never ;
You can’t perform that action at this time.
0 commit comments