@gabrielrufino/cube 1.0.57 → 1.0.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/Array/index.d.ts +1 -1
- package/build/BinarySearchTree/index.d.ts +1 -1
- package/build/DataStructure/index.d.ts +1 -1
- package/build/Deck/index.d.ts +1 -1
- package/build/Dictionary/index.d.ts +2 -2
- package/build/DoublyLinkedList/index.d.ts +1 -1
- package/build/Graph/index.d.ts +1 -1
- package/build/HashTable/index.d.ts +1 -1
- package/build/HashTableLinearProbing/index.d.ts +1 -1
- package/build/HashTableSeparateChaining/index.d.ts +1 -1
- package/build/LinkedList/index.d.ts +1 -1
- package/build/MaxHeap/IMaxHeapOptions.d.ts +1 -1
- package/build/MinHeap/IMinHeapOptions.d.ts +1 -1
- package/build/Queue/index.d.ts +1 -1
- package/build/Set/index.d.ts +1 -1
- package/build/Stack/index.d.ts +1 -1
- package/package.json +5 -5
package/build/Array/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import DataStructure from '../DataStructure';
|
|
2
2
|
import IArray from './IArray';
|
|
3
3
|
export default class Array<T = number> extends DataStructure<T> implements IArray<T> {
|
|
4
|
-
constructor(...inputs: T[]);
|
|
4
|
+
constructor(...inputs: Readonly<T[]>);
|
|
5
5
|
insertInLastPosition(element: T): T;
|
|
6
6
|
insertInFirstPosition(element: T): T;
|
|
7
7
|
insertInPosition(position: number, element: T): T;
|
|
@@ -4,7 +4,7 @@ import IBinarySearchTreeData from './IBinarySearchTreeData';
|
|
|
4
4
|
export default class BinarySearchTree<T = number> implements IBinarySearchTree<T> {
|
|
5
5
|
private _root;
|
|
6
6
|
private _size;
|
|
7
|
-
constructor({ inputs, lessThanOrEqualTo }?: IBinarySearchNodeOptions<T
|
|
7
|
+
constructor({ inputs, lessThanOrEqualTo }?: Readonly<IBinarySearchNodeOptions<T>>);
|
|
8
8
|
get data(): IBinarySearchTreeData<T>;
|
|
9
9
|
get size(): number;
|
|
10
10
|
get min(): T | null;
|
package/build/Deck/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import DataStructure from '../DataStructure';
|
|
2
2
|
import IDeck from './IDeck';
|
|
3
3
|
export default class Deck<T = number> extends DataStructure<T> implements IDeck<T> {
|
|
4
|
-
constructor(...inputs: T[]);
|
|
4
|
+
constructor(...inputs: Readonly<T[]>);
|
|
5
5
|
addFront(element: T): T;
|
|
6
6
|
addBack(element: T): T;
|
|
7
7
|
removeFront(): T | undefined;
|
|
@@ -2,9 +2,9 @@ import IDictionary from './IDictionary';
|
|
|
2
2
|
import IDictionaryData from './IDictionaryData';
|
|
3
3
|
export default class Dictionary<T = number> implements IDictionary<T> {
|
|
4
4
|
private _data;
|
|
5
|
-
constructor(inputs?: {
|
|
5
|
+
constructor(inputs?: Readonly<{
|
|
6
6
|
[key: string]: T;
|
|
7
|
-
});
|
|
7
|
+
}>);
|
|
8
8
|
get data(): IDictionaryData<T>;
|
|
9
9
|
get size(): number;
|
|
10
10
|
get isEmpty(): boolean;
|
|
@@ -3,7 +3,7 @@ export default class DoublyLinkedList<T = number> implements IDoublyLinkedList<T
|
|
|
3
3
|
private _head;
|
|
4
4
|
private _tail;
|
|
5
5
|
private _size;
|
|
6
|
-
constructor(...inputs: T[]);
|
|
6
|
+
constructor(...inputs: Readonly<T[]>);
|
|
7
7
|
get data(): IDoublyLinkedListItem<T>[];
|
|
8
8
|
get size(): number;
|
|
9
9
|
/**
|
package/build/Graph/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import IGraphOptions from './IGraphOptions';
|
|
|
3
3
|
export default class Graph implements IGraph {
|
|
4
4
|
private _isDirected;
|
|
5
5
|
private _data;
|
|
6
|
-
constructor({ inputs, isDirected }?: IGraphOptions);
|
|
6
|
+
constructor({ inputs, isDirected }?: Readonly<IGraphOptions>);
|
|
7
7
|
get isDirected(): boolean;
|
|
8
8
|
get data(): {
|
|
9
9
|
[key: string]: string[];
|
|
@@ -4,7 +4,7 @@ import IHashTableInputs from './IHashTableInputs';
|
|
|
4
4
|
import IHashTableOptions from './IHashTableOptions';
|
|
5
5
|
export default class HashTable<T = number> implements IHashTable<T> {
|
|
6
6
|
private _data;
|
|
7
|
-
constructor(inputs?: IHashTableInputs<T
|
|
7
|
+
constructor(inputs?: Readonly<IHashTableInputs<T>>, { maxSize }?: IHashTableOptions);
|
|
8
8
|
get data(): IHashTableData<T>;
|
|
9
9
|
get size(): number;
|
|
10
10
|
get maxSize(): number;
|
|
@@ -5,7 +5,7 @@ import IHashTableLinearProbingOptions from './IHashTableLinearProbingOptions';
|
|
|
5
5
|
export default class HashTableLinearProbing<T = number> implements IHashTableLinearProbing<T> {
|
|
6
6
|
private _maxSize;
|
|
7
7
|
private _data;
|
|
8
|
-
constructor(inputs?: IHashTableLinearProbingInputs<T
|
|
8
|
+
constructor(inputs?: Readonly<IHashTableLinearProbingInputs<T>>, { maxSize }?: IHashTableLinearProbingOptions);
|
|
9
9
|
get data(): {
|
|
10
10
|
[index: number]: HashTableLinearProbingElement<T>;
|
|
11
11
|
};
|
|
@@ -4,7 +4,7 @@ import IHashTableSeparateChainingData from './IHashTableSeparateChainingData';
|
|
|
4
4
|
import IHashTableSeparateChainingInputs from './IHashTableSeparateChainingInputs';
|
|
5
5
|
export default class HashTableSeparateChaining<T = number> implements IHashTableSeparateChaining<T> {
|
|
6
6
|
private _data;
|
|
7
|
-
constructor(inputs?: IHashTableSeparateChainingInputs<T
|
|
7
|
+
constructor(inputs?: Readonly<IHashTableSeparateChainingInputs<T>>, { maxSize }?: {
|
|
8
8
|
maxSize: number;
|
|
9
9
|
});
|
|
10
10
|
get data(): IHashTableSeparateChainingData<T>;
|
|
@@ -4,7 +4,7 @@ export default class LinkedList<T = number> implements ILinkedList<T> {
|
|
|
4
4
|
private readonly _FIRST_POSITION;
|
|
5
5
|
private _head;
|
|
6
6
|
private _size;
|
|
7
|
-
constructor(...inputs: T[]);
|
|
7
|
+
constructor(...inputs: Readonly<T[]>);
|
|
8
8
|
get data(): {
|
|
9
9
|
value: T;
|
|
10
10
|
next: NonNullable<T> | null;
|
package/build/Queue/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import DataStructure from '../DataStructure';
|
|
2
2
|
import IQueue from './IQueue';
|
|
3
3
|
export default class Queue<T = number> extends DataStructure<T> implements IQueue<T> {
|
|
4
|
-
constructor(...inputs: T[]);
|
|
4
|
+
constructor(...inputs: Readonly<T[]>);
|
|
5
5
|
get isEmpty(): boolean;
|
|
6
6
|
enqueue(element: T): T;
|
|
7
7
|
dequeue(): T | undefined;
|
package/build/Set/index.d.ts
CHANGED
package/build/Stack/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import DataStructure from '../DataStructure';
|
|
2
2
|
import IStack from './IStack';
|
|
3
3
|
export default class Stack<T = number> extends DataStructure<T> implements IStack<T> {
|
|
4
|
-
constructor(...inputs: T[]);
|
|
4
|
+
constructor(...inputs: Readonly<T[]>);
|
|
5
5
|
push(element: T): T;
|
|
6
6
|
pop(): T | undefined;
|
|
7
7
|
peek(): T | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gabrielrufino/cube",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.61",
|
|
4
4
|
"description": "Data Structures and Algorithms made in Typescript",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
"@stryker-mutator/jest-runner": "^6.3.1",
|
|
36
36
|
"@stryker-mutator/typescript-checker": "^6.3.1",
|
|
37
37
|
"@types/jest": "^28.1.8",
|
|
38
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
39
|
-
"@typescript-eslint/parser": "^5.
|
|
38
|
+
"@typescript-eslint/eslint-plugin": "^5.50.0",
|
|
39
|
+
"@typescript-eslint/parser": "^5.50.0",
|
|
40
40
|
"clinic": "^12.0.0",
|
|
41
|
-
"eslint": "^8.
|
|
41
|
+
"eslint": "^8.33.0",
|
|
42
42
|
"eslint-config-xo": "^0.43.1",
|
|
43
43
|
"jest": "^28.1.3",
|
|
44
44
|
"rimraf": "^3.0.2",
|
|
45
45
|
"ts-jest": "^28.0.8",
|
|
46
46
|
"ts-node": "^10.9.1",
|
|
47
|
-
"typescript": "^4.9.
|
|
47
|
+
"typescript": "^4.9.5"
|
|
48
48
|
}
|
|
49
49
|
}
|