extra-iterator 0.9.1 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.d.ts +4 -4
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -106,7 +106,7 @@ export declare class ExtraIterator<T> extends Iterator<T, any, any> {
106
106
  * .toArray()
107
107
  * // returns [1, 2, 3, 4]
108
108
  */
109
- append(item: T): ExtraIterator<T>;
109
+ append<U>(item: U): ExtraIterator<T | U>;
110
110
  /**
111
111
  * Prepends a new value to the beginning of the iterator. The new value will be yielded first, then the rest of this
112
112
  * iterator will be yielded.
@@ -118,7 +118,7 @@ export declare class ExtraIterator<T> extends Iterator<T, any, any> {
118
118
  * .toArray()
119
119
  * // returns [0, 1, 2, 3]
120
120
  */
121
- prepend(item: T): ExtraIterator<T>;
121
+ prepend<U>(item: U): ExtraIterator<T | U>;
122
122
  /**
123
123
  * Concatenates multiple values to the end of this iterator.
124
124
  *
@@ -129,7 +129,7 @@ export declare class ExtraIterator<T> extends Iterator<T, any, any> {
129
129
  * .toArray()
130
130
  * // returns [1, 2, 3, 4, 5, 6]
131
131
  */
132
- concat(items: Iterable<T>): ExtraIterator<T>;
132
+ concat<U>(items: Iterable<U>): ExtraIterator<T | U>;
133
133
  /**
134
134
  * Concatenates multiple values to the start of this iterator.
135
135
  *
@@ -144,7 +144,7 @@ export declare class ExtraIterator<T> extends Iterator<T, any, any> {
144
144
  * .toArray()
145
145
  * // returns [1, 2, 3, 4, 5, 6]
146
146
  */
147
- prependMany(items: Iterable<T>): ExtraIterator<T>;
147
+ prependMany<U>(items: Iterable<U>): ExtraIterator<T | U>;
148
148
  /**
149
149
  * Creates a new iterator that invokes the provided callback function over each element of this iterator and yields
150
150
  * the elements for which the callback returns `true`, only for as long as the callback returns `true`.
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "An extension of the Iterator class with additional utility helper functions.",
4
4
  "author": "Leonardo Raele <leonardoraele@gmail.com>",
5
5
  "license": "MIT",
6
- "version": "0.9.1",
6
+ "version": "0.9.2",
7
7
  "type": "module",
8
8
  "exports": {
9
9
  ".": "./dist/index.js",