Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaly-t committed Jul 29, 2023
1 parent 278b977 commit 0b675b3
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/types/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,18 @@ export interface IErrorContext<T> {
*/
export interface IterableExt<T> extends Iterable<T> {
/**
* - first element produced by the iterable;
* - `undefined`, if the iterable produced nothing.
* A getter that creates a new iterator, iterates to the first element and returns the value.
*
* It is to simplify use of one-value iterables.
* It is to simplify accessing value of single-element iterables.
*
* _IMPORTANT:_ It is a getter that creates a new iterator from the iterable,
* and then iterates to the first value.
* @returns
* - first element produced by the iterable;
* - `undefined`, if the iterable produced nothing.
*/
readonly first: T | undefined;

/**
* Appends {@link catchError} operator to the pipeline.
* Appends {@link catchError} operator to the end of pipeline.
*
* @see {@link https://github.com/vitaly-t/iter-ops/wiki/Error-Handling Error Handling}
*/
Expand All @@ -74,18 +74,18 @@ export interface IterableExt<T> extends Iterable<T> {
*/
export interface AsyncIterableExt<T> extends AsyncIterable<T> {
/**
* - first element/`Promise` produced by the iterable;
* - `Promise<undefined>`, if the iterable produced nothing.
* A getter that creates a new iterator, iterates to the first element and returns the value.
*
* It is to simplify use of one-value iterables.
* It is to simplify accessing value of single-element iterables.
*
* _IMPORTANT:_ It is a getter that creates a new iterator from the iterable,
* and then iterates to the first value.
* @returns
* - first element / `Promise` produced by the iterable;
* - `Promise<undefined>`, if the iterable produced nothing.
*/
readonly first: Promise<T | undefined>;

/**
* Appends {@link catchError} operator to the pipeline.
* Appends {@link catchError} operator to the end of pipeline.
*
* @see {@link https://github.com/vitaly-t/iter-ops/wiki/Error-Handling Error Handling}
*/
Expand Down

0 comments on commit 0b675b3

Please sign in to comment.