Skip to content

Commit

Permalink
chore: input type on slice
Browse files Browse the repository at this point in the history
  • Loading branch information
ppeeou authored and DoHyeong Lee committed Dec 24, 2021
1 parent d6bba0a commit 5666081
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/Lazy/slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { isAsyncIterable, isIterable } from "../_internal/utils";
import concurrent, { isConcurrent } from "./concurrent";

function* sync<T>(
start = 0,
end = Infinity,
start: number,
end: number,
iterable: Iterable<T>,
): IterableIterator<T> {
let i = 0;
Expand All @@ -18,8 +18,8 @@ function* sync<T>(
}

async function* asyncSequential<T>(
start = 0,
end = Infinity,
start: number,
end: number,
iterable: AsyncIterable<T>,
): AsyncIterableIterator<T> {
let i = 0;
Expand All @@ -32,8 +32,8 @@ async function* asyncSequential<T>(
}

function async<T>(
start = 0,
end = Infinity,
start: number,
end: number,
iterable: AsyncIterable<T>,
): AsyncIterableIterator<T> {
let iterator: AsyncIterator<T>;
Expand Down Expand Up @@ -107,6 +107,8 @@ function _slice<T extends Iterable<unknown> | AsyncIterable<unknown>>(
* slice(1, 3),
* toArray,
* ); // [2, 3]
*
* see {@link https://fxts.dev/docs/pipe | pipe}, {@link https://fxts.dev/docs/toArray | toArray}
* ```
*/
// prettier-ignore
Expand Down

0 comments on commit 5666081

Please sign in to comment.