@kakasoo/proto-typescript
Advanced tools
Comparing version 1.17.0 to 1.17.1
@@ -12,3 +12,3 @@ import { ToPrimitive } from '../interfaces/to-primitive.interface'; | ||
constructor(data: T extends Array<any> ? T : never); | ||
constructor(...data: T extends Array<any> ? T : never); | ||
constructor(...data: T extends Array<any> ? T : []); | ||
/** | ||
@@ -15,0 +15,0 @@ * @todo Can't we prioritize the values we received over the range? Why don't we just make a `refine` method for this, too? |
@@ -46,2 +46,4 @@ import { ToPrimitive } from '../interfaces/to-primitive.interface'; | ||
/** | ||
* @todo remove `as any` statement | ||
* | ||
* type-safe split. | ||
@@ -48,0 +50,0 @@ * @inheritdoc |
@@ -80,2 +80,4 @@ "use strict"; | ||
/** | ||
* @todo remove `as any` statement | ||
* | ||
* type-safe split. | ||
@@ -85,6 +87,6 @@ * @inheritdoc | ||
split(splitter = new TypedString(), limit = new typed_number_class_1.TypedNumber()) { | ||
const primitiveContainer = this.isTypedClass(splitter) ? splitter.toPrimitive() : splitter; | ||
const primitiveContainer = (this.isTypedClass(splitter) ? splitter.toPrimitive() : splitter); | ||
const primitiveLimit = this.isTypedClass(limit) ? limit.toPrimitive() : limit; | ||
const initialValue = prototypes_1.StringPrototype.split(this.string, primitiveContainer, primitiveLimit); | ||
return new typed_array_class_1.TypedArray(...initialValue); | ||
return new typed_array_class_1.TypedArray(initialValue); | ||
} | ||
@@ -91,0 +93,0 @@ toPrimitive() { |
{ | ||
"name": "@kakasoo/proto-typescript", | ||
"version": "1.17.0", | ||
"version": "1.17.1", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
@@ -5,1 +5,4 @@ # proto-typescript | ||
I plan to share the features that are officially available from 2.0.0. | ||
You can use the same method as the prototype of JavaScript. |
Sorry, the diff of this file is not supported yet
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
124498
1408
7