@kakasoo/proto-typescript
Advanced tools
Comparing version 1.7.1 to 1.8.0
@@ -5,8 +5,9 @@ import { toPrimitive } from './interfaces/to-primitive.interface'; | ||
import { TypedString } from './typed-string.class'; | ||
import { MethodsFrom } from './types'; | ||
import { ElementOf, MethodsFrom } from './types'; | ||
import { ReadonlyOrNot } from './types/primitive.type'; | ||
export declare class TypedArray<T extends ReadonlyOrNot<any[]>> implements Pick<MethodsFrom<Array<any>>, 'join' | 'at' | 'push'>, toPrimitive<[...T]> { | ||
export declare class TypedArray<T extends ReadonlyOrNot<any[]>> implements Pick<MethodsFrom<Array<any>>, 'join' | 'at' | 'push'>, toPrimitive<[...T]>, Iterable<ElementOf<T>> { | ||
private readonly data; | ||
constructor(data: T); | ||
constructor(...data: T); | ||
[Symbol.iterator](): Iterator<ElementOf<T>, any>; | ||
/** | ||
@@ -23,3 +24,3 @@ * Appends new elements to the end of an array | ||
*/ | ||
push<Items extends ReadonlyOrNot<any[]>>(...items: Items): TypedArray<ReturnType<typeof ArrayPrototype.push<T, Items>>>; | ||
push<Items extends ReadonlyOrNot<ElementOf<T>[]>>(...items: Items): TypedArray<ReturnType<typeof ArrayPrototype.push<T, Items>>>; | ||
/** | ||
@@ -26,0 +27,0 @@ * @inheritDoc |
@@ -12,2 +12,12 @@ "use strict"; | ||
} | ||
[Symbol.iterator]() { | ||
let i = 0; | ||
return { | ||
next: () => { | ||
return i === this.data.length | ||
? { done: true, value: undefined } | ||
: { value: this.data.at(i++), done: false }; | ||
}, | ||
}; | ||
} | ||
/** | ||
@@ -14,0 +24,0 @@ * Appends new elements to the end of an array |
{ | ||
"name": "@kakasoo/proto-typescript", | ||
"version": "1.7.1", | ||
"version": "1.8.0", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
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
61335
639