From 2aae644b4c8c59cb5167a9cc5371cfe20dafdf36 Mon Sep 17 00:00:00 2001 From: Trevor Sears Date: Fri, 27 Aug 2021 11:22:01 -0400 Subject: [PATCH] Bumped package version again. Forgot to compile code before pushing new package to NPM last time. :\ --- package.json | 2 +- ts/core/abstract-iterator.ts | 2 +- ts/tests/array-iterator.test.ts | 2 +- ts/utility/array-iterator.ts | 2 +- ts/utility/string-character-iterator.ts | 2 +- ts/utility/string-line-iterator.ts | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index f0aa06c..a4be3d1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "iter-over", - "version": "2.0.1", + "version": "2.0.2", "description": "Sugary iteration utilities and interfaces.", "main": "js/main", "types": ".d.ts/main", diff --git a/ts/core/abstract-iterator.ts b/ts/core/abstract-iterator.ts index 04fd56c..c7969b8 100644 --- a/ts/core/abstract-iterator.ts +++ b/ts/core/abstract-iterator.ts @@ -27,7 +27,7 @@ export abstract class AbstractIterator implements IIterator { * * @returns {E | undefined} The next element this AbstractIterator has. */ - public abstract next(): E | undefined; + public abstract next(): E; /** * Performs the specified action for all of the remaining elements in this AbstractIterator. diff --git a/ts/tests/array-iterator.test.ts b/ts/tests/array-iterator.test.ts index fe44d98..959632c 100644 --- a/ts/tests/array-iterator.test.ts +++ b/ts/tests/array-iterator.test.ts @@ -139,7 +139,7 @@ describe("Per-method tests.", (): void => { let resultSet: number[] = []; - populatedIterator.forEachRemaining((element: number) => resultSet.push(element)); + populatedIterator.forEachRemaining((element: number | undefined) => resultSet.push(element as number)); expect(resultSet).toStrictEqual(iteratorArray); diff --git a/ts/utility/array-iterator.ts b/ts/utility/array-iterator.ts index b51099b..e3f5b4f 100644 --- a/ts/utility/array-iterator.ts +++ b/ts/utility/array-iterator.ts @@ -13,7 +13,7 @@ import { AbstractIterator } from "../core/abstract-iterator"; * @version v1.5.0 * @since v0.1.0 */ -export class ArrayIterator extends AbstractIterator { +export class ArrayIterator extends AbstractIterator { /** * The array over which this object is iterating. diff --git a/ts/utility/string-character-iterator.ts b/ts/utility/string-character-iterator.ts index 4b20c4c..73dbc55 100644 --- a/ts/utility/string-character-iterator.ts +++ b/ts/utility/string-character-iterator.ts @@ -13,7 +13,7 @@ import { AbstractIterator } from "../core/abstract-iterator"; * @version v1.0.0 * @since v0.1.0 */ -export class StringCharacterIterator extends AbstractIterator { +export class StringCharacterIterator extends AbstractIterator { private content: string; diff --git a/ts/utility/string-line-iterator.ts b/ts/utility/string-line-iterator.ts index f028470..b922b7d 100644 --- a/ts/utility/string-line-iterator.ts +++ b/ts/utility/string-line-iterator.ts @@ -13,7 +13,7 @@ import { AbstractIterator } from "../core/abstract-iterator"; * @version v1.2.0 * @since v1.2.0 */ -export class StringLineIterator extends AbstractIterator { +export class StringLineIterator extends AbstractIterator { private content: string;