From 5666081565e16da7515f37bcce4fec73a5a3c598 Mon Sep 17 00:00:00 2001 From: "hyunwoo.jo" Date: Thu, 23 Dec 2021 17:57:09 +0900 Subject: [PATCH] chore: input type on slice --- src/Lazy/slice.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/Lazy/slice.ts b/src/Lazy/slice.ts index 862e954d..80446245 100644 --- a/src/Lazy/slice.ts +++ b/src/Lazy/slice.ts @@ -4,8 +4,8 @@ import { isAsyncIterable, isIterable } from "../_internal/utils"; import concurrent, { isConcurrent } from "./concurrent"; function* sync( - start = 0, - end = Infinity, + start: number, + end: number, iterable: Iterable, ): IterableIterator { let i = 0; @@ -18,8 +18,8 @@ function* sync( } async function* asyncSequential( - start = 0, - end = Infinity, + start: number, + end: number, iterable: AsyncIterable, ): AsyncIterableIterator { let i = 0; @@ -32,8 +32,8 @@ async function* asyncSequential( } function async( - start = 0, - end = Infinity, + start: number, + end: number, iterable: AsyncIterable, ): AsyncIterableIterator { let iterator: AsyncIterator; @@ -107,6 +107,8 @@ function _slice | AsyncIterable>( * slice(1, 3), * toArray, * ); // [2, 3] + * + * see {@link https://fxts.dev/docs/pipe | pipe}, {@link https://fxts.dev/docs/toArray | toArray} * ``` */ // prettier-ignore