Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More โ†’
Socket
Sign inDemoInstall
Socket

@kakasoo/proto-typescript

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kakasoo/proto-typescript - npm Package Compare versions

Comparing version 1.5.1 to 1.6.0

11

dist/prototypes/array.prototype.d.ts

@@ -1,4 +0,11 @@

import { Join } from '../types';
import { At, Join } from '../types';
export declare const ArrayPrototype: {
/**
* Returns the item located at the specified index.
* @param container
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
* @returns
*/
at<Container extends any[] | readonly any[], Index extends number>(container: Container, index: Index): At<Container, Index>;
/**
* type-safe join.

@@ -13,4 +20,4 @@ * @example ArrayPrototype.join(["a", "b"]);

*/
join<Container extends readonly (string | number | boolean)[] | (string | number | boolean)[], Separator extends string = ",">(container: Container, separator?: Separator): Join<Container, Separator>;
join<Container_1 extends readonly (string | number | boolean)[] | (string | number | boolean)[], Separator extends string = ",">(container: Container_1, separator?: Separator): Join<Container_1, Separator>;
};
//# sourceMappingURL=array.prototype.d.ts.map

@@ -6,2 +6,11 @@ "use strict";

/**
* Returns the item located at the specified index.
* @param container
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
* @returns
*/
at(container, index) {
return container.at(index);
},
/**
* type-safe join.

@@ -8,0 +17,0 @@ * @example ArrayPrototype.join(["a", "b"]);

import { toPrimitive } from './interfaces/to-primitive.interface';
import { ArrayPrototype } from './prototypes';
import { TypedString } from './typed-string.class';
export declare class TypedArray<T extends any[] | readonly any[]> implements toPrimitive<[...T]> {
import { MethodsFrom } from './types';
export declare class TypedArray<T extends any[] | readonly any[]> implements Pick<MethodsFrom<Array<any>>, 'join' | 'at'>, toPrimitive<[...T]> {
private readonly data;
constructor(data: T);
/**
* Returns the item located at the specified index.
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
*/
at<Index extends number = 0>(index: Index): ReturnType<typeof ArrayPrototype.at<T, Index>>;
/**
* type-safe join.

@@ -9,0 +15,0 @@ * @example new TypedArray([1, 2, 3] as const).join(',');

@@ -7,2 +7,3 @@ "use strict";

class TypedArray {
data;
constructor(data) {

@@ -12,2 +13,9 @@ this.data = data;

/**
* Returns the item located at the specified index.
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
*/
at(index) {
return this.at(index);
}
/**
* type-safe join.

@@ -14,0 +22,0 @@ * @example new TypedArray([1, 2, 3] as const).join(',');

@@ -5,2 +5,3 @@ "use strict";

class TypedNumber {
data;
constructor(data = 0) {

@@ -7,0 +8,0 @@ this.data = data;

@@ -7,2 +7,3 @@ "use strict";

class TypedString {
data;
constructor(data = '') {

@@ -9,0 +10,0 @@ this.data = String(data);

@@ -100,2 +100,3 @@ import { Add, Divide, Multiply, NToNumber, Remainder, Sub } from './number.type';

} : never;
export type At<Tuple extends any[] | readonly any[], Index extends number> = Tuple[Index];
//# sourceMappingURL=array.type.d.ts.map

6

dist/types/function.type.d.ts

@@ -1,4 +0,4 @@

export type MethodNames<T> = {
[K in keyof T]: T[K] extends (...args: any[]) => any ? K : never;
}[keyof T];
export type MethodsFrom<T> = {
[K in keyof T as T[K] extends (...args: any[]) => any ? K : never]: Function;
};
//# sourceMappingURL=function.type.d.ts.map
{
"name": "@kakasoo/proto-typescript",
"version": "1.5.1",
"version": "1.6.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

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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with โšก๏ธ by Socket Inc