|
1 | 1 | import { |
2 | 2 | reactAsyncIterSpecialInfoSymbol, |
| 3 | + type ReactAsyncIterable, |
3 | 4 | type ReactAsyncIterSpecialInfo, |
4 | | -} from '../common/reactAsyncIterSpecialInfoSymbol.js'; |
| 5 | +} from '../common/ReactAsyncIterable.js'; |
5 | 6 | import { asyncIterSyncMap } from '../common/asyncIterSyncMap.js'; |
6 | 7 | import { isAsyncIter } from '../common/isAsyncIter.js'; |
7 | 8 | import { type ExtractAsyncIterValue } from '../common/ExtractAsyncIterValue.js'; |
8 | 9 | import { type useAsyncIter } from '../useAsyncIter/index.js'; // eslint-disable-line @typescript-eslint/no-unused-vars |
9 | 10 | import { type Iterate } from '../Iterate/index.js'; // eslint-disable-line @typescript-eslint/no-unused-vars |
10 | 11 |
|
11 | | -export { iterateFormatted, type FixedRefFormattedIterable }; |
| 12 | +export { iterateFormatted }; |
12 | 13 |
|
13 | 14 | /** |
14 | 15 | * An optional utility to format an async iterable's values inline right where its passing into |
@@ -75,9 +76,7 @@ export { iterateFormatted, type FixedRefFormattedIterable }; |
75 | 76 | function iterateFormatted<TIn, TOut>( |
76 | 77 | source: TIn, |
77 | 78 | formatFn: (value: ExtractAsyncIterValue<TIn>, i: number) => TOut |
78 | | -): TIn extends AsyncIterable<unknown> |
79 | | - ? FixedRefFormattedIterable<ExtractAsyncIterValue<TIn>, TOut> |
80 | | - : TOut; |
| 79 | +): TIn extends AsyncIterable<unknown> ? ReactAsyncIterable<ExtractAsyncIterValue<TIn>, TOut> : TOut; |
81 | 80 |
|
82 | 81 | function iterateFormatted( |
83 | 82 | source: unknown, |
@@ -107,7 +106,3 @@ function iterateFormatted( |
107 | 106 | }, |
108 | 107 | }; |
109 | 108 | } |
110 | | - |
111 | | -type FixedRefFormattedIterable<TVal, TValFormatted> = AsyncIterable<TValFormatted, void, void> & { |
112 | | - [reactAsyncIterSpecialInfoSymbol]: ReactAsyncIterSpecialInfo<TVal, TValFormatted>; |
113 | | -}; |
0 commit comments