@ts-common/iterator
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -0,1 +1,13 @@ | ||
export declare type Iterator<T> = { | ||
/** | ||
* Returns `IterableResult<T>`. | ||
*/ | ||
readonly next: () => IteratorResult<T>; | ||
}; | ||
export declare type Iterable<T> = { | ||
/** | ||
* The function returns an iterator. | ||
*/ | ||
readonly [Symbol.iterator]: () => Iterator<T>; | ||
}; | ||
export declare type IterableEx<T> = Iterable<T> & { | ||
@@ -118,3 +130,3 @@ /** | ||
}; | ||
export declare const iterable: <T>(createIterator: () => Iterator<T, any, undefined>) => IterableEx<T>; | ||
export declare const iterable: <T>(createIterator: () => Iterator<T>) => IterableEx<T>; | ||
export declare type Entry<T> = readonly [number, T]; | ||
@@ -121,0 +133,0 @@ export declare const ENTRY_KEY = 0; |
{ | ||
"name": "@ts-common/iterator", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Iterator library for JavaScript and TypeScript", | ||
@@ -69,6 +69,6 @@ "main": "dist/index.js", | ||
"jest-junit": "^10.0.0", | ||
"tslib": "^2.3.1", | ||
"tslint": "^6.0.0", | ||
"tslint-immutable": "^6.0.1", | ||
"typescript": "^3.7.5", | ||
"tslib": "^1.10.0" | ||
"typescript": "^3.7.5" | ||
}, | ||
@@ -75,0 +75,0 @@ "dependencies": {}, |
@@ -0,1 +1,15 @@ | ||
export type Iterator<T> = { | ||
/** | ||
* Returns `IterableResult<T>`. | ||
*/ | ||
readonly next: () => IteratorResult<T>; | ||
} | ||
export type Iterable<T> = { | ||
/** | ||
* The function returns an iterator. | ||
*/ | ||
readonly [Symbol.iterator]: () => Iterator<T>; | ||
} | ||
export type IterableEx<T> = Iterable<T> & { | ||
@@ -2,0 +16,0 @@ /** |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
56837
868