directed-graph-typed 1.39.6 → 1.41.0

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.
Files changed (96) hide show
  1. package/dist/data-structures/binary-tree/avl-tree.js +0 -1
  2. package/dist/data-structures/binary-tree/binary-indexed-tree.d.ts +0 -3
  3. package/dist/data-structures/binary-tree/binary-indexed-tree.js +2 -11
  4. package/dist/data-structures/binary-tree/binary-tree.d.ts +13 -20
  5. package/dist/data-structures/binary-tree/binary-tree.js +30 -31
  6. package/dist/data-structures/binary-tree/bst.d.ts +2 -2
  7. package/dist/data-structures/binary-tree/bst.js +4 -4
  8. package/dist/data-structures/binary-tree/rb-tree.d.ts +95 -11
  9. package/dist/data-structures/binary-tree/rb-tree.js +379 -18
  10. package/dist/data-structures/binary-tree/segment-tree.d.ts +10 -26
  11. package/dist/data-structures/binary-tree/segment-tree.js +10 -58
  12. package/dist/data-structures/binary-tree/tree-multiset.d.ts +1 -1
  13. package/dist/data-structures/binary-tree/tree-multiset.js +6 -6
  14. package/dist/data-structures/graph/abstract-graph.d.ts +5 -24
  15. package/dist/data-structures/graph/abstract-graph.js +4 -43
  16. package/dist/data-structures/graph/directed-graph.d.ts +4 -10
  17. package/dist/data-structures/graph/directed-graph.js +2 -20
  18. package/dist/data-structures/graph/map-graph.d.ts +4 -10
  19. package/dist/data-structures/graph/map-graph.js +2 -20
  20. package/dist/data-structures/graph/undirected-graph.d.ts +1 -8
  21. package/dist/data-structures/graph/undirected-graph.js +1 -14
  22. package/dist/data-structures/hash/coordinate-map.d.ts +0 -1
  23. package/dist/data-structures/hash/coordinate-map.js +0 -3
  24. package/dist/data-structures/hash/coordinate-set.d.ts +0 -1
  25. package/dist/data-structures/hash/coordinate-set.js +0 -3
  26. package/dist/data-structures/hash/hash-map.d.ts +8 -14
  27. package/dist/data-structures/hash/hash-map.js +4 -22
  28. package/dist/data-structures/hash/hash-table.d.ts +6 -9
  29. package/dist/data-structures/hash/hash-table.js +0 -9
  30. package/dist/data-structures/heap/heap.d.ts +12 -6
  31. package/dist/data-structures/heap/heap.js +40 -22
  32. package/dist/data-structures/linked-list/doubly-linked-list.d.ts +6 -14
  33. package/dist/data-structures/linked-list/doubly-linked-list.js +18 -42
  34. package/dist/data-structures/linked-list/singly-linked-list.d.ts +5 -11
  35. package/dist/data-structures/linked-list/singly-linked-list.js +17 -35
  36. package/dist/data-structures/linked-list/skip-linked-list.d.ts +29 -10
  37. package/dist/data-structures/linked-list/skip-linked-list.js +62 -17
  38. package/dist/data-structures/matrix/matrix.d.ts +1 -1
  39. package/dist/data-structures/matrix/matrix2d.d.ts +1 -1
  40. package/dist/data-structures/matrix/navigator.d.ts +4 -4
  41. package/dist/data-structures/queue/deque.d.ts +8 -12
  42. package/dist/data-structures/queue/deque.js +31 -43
  43. package/dist/data-structures/queue/queue.d.ts +20 -5
  44. package/dist/data-structures/queue/queue.js +35 -18
  45. package/dist/data-structures/stack/stack.d.ts +2 -1
  46. package/dist/data-structures/stack/stack.js +10 -7
  47. package/dist/data-structures/tree/tree.d.ts +3 -9
  48. package/dist/data-structures/tree/tree.js +3 -21
  49. package/dist/data-structures/trie/trie.d.ts +6 -12
  50. package/dist/data-structures/trie/trie.js +6 -24
  51. package/dist/interfaces/binary-tree.d.ts +1 -1
  52. package/dist/types/data-structures/binary-tree/bst.d.ts +1 -1
  53. package/dist/types/data-structures/binary-tree/rb-tree.d.ts +3 -7
  54. package/dist/types/data-structures/binary-tree/rb-tree.js +11 -6
  55. package/package.json +2 -2
  56. package/src/data-structures/binary-tree/avl-tree.ts +2 -4
  57. package/src/data-structures/binary-tree/binary-indexed-tree.ts +3 -15
  58. package/src/data-structures/binary-tree/binary-tree.ts +40 -43
  59. package/src/data-structures/binary-tree/bst.ts +9 -10
  60. package/src/data-structures/binary-tree/rb-tree.ts +415 -355
  61. package/src/data-structures/binary-tree/segment-tree.ts +16 -83
  62. package/src/data-structures/binary-tree/tree-multiset.ts +8 -9
  63. package/src/data-structures/graph/abstract-graph.ts +21 -67
  64. package/src/data-structures/graph/directed-graph.ts +13 -39
  65. package/src/data-structures/graph/map-graph.ts +7 -32
  66. package/src/data-structures/graph/undirected-graph.ts +9 -26
  67. package/src/data-structures/hash/coordinate-map.ts +0 -4
  68. package/src/data-structures/hash/coordinate-set.ts +0 -4
  69. package/src/data-structures/hash/hash-map.ts +13 -37
  70. package/src/data-structures/hash/hash-table.ts +6 -18
  71. package/src/data-structures/hash/tree-map.ts +2 -1
  72. package/src/data-structures/hash/tree-set.ts +2 -1
  73. package/src/data-structures/heap/heap.ts +58 -30
  74. package/src/data-structures/heap/max-heap.ts +1 -1
  75. package/src/data-structures/heap/min-heap.ts +1 -1
  76. package/src/data-structures/linked-list/doubly-linked-list.ts +26 -60
  77. package/src/data-structures/linked-list/singly-linked-list.ts +24 -49
  78. package/src/data-structures/linked-list/skip-linked-list.ts +73 -25
  79. package/src/data-structures/matrix/matrix.ts +2 -2
  80. package/src/data-structures/matrix/matrix2d.ts +1 -1
  81. package/src/data-structures/matrix/navigator.ts +4 -4
  82. package/src/data-structures/matrix/vector2d.ts +2 -1
  83. package/src/data-structures/priority-queue/max-priority-queue.ts +1 -1
  84. package/src/data-structures/priority-queue/min-priority-queue.ts +1 -1
  85. package/src/data-structures/priority-queue/priority-queue.ts +1 -1
  86. package/src/data-structures/queue/deque.ts +38 -53
  87. package/src/data-structures/queue/queue.ts +38 -20
  88. package/src/data-structures/stack/stack.ts +13 -9
  89. package/src/data-structures/tree/tree.ts +7 -33
  90. package/src/data-structures/trie/trie.ts +14 -40
  91. package/src/interfaces/binary-tree.ts +1 -1
  92. package/src/types/data-structures/binary-tree/bst.ts +1 -1
  93. package/src/types/data-structures/binary-tree/rb-tree.ts +6 -6
  94. package/src/types/data-structures/matrix/navigator.ts +1 -1
  95. package/src/types/utils/utils.ts +1 -1
  96. package/src/types/utils/validate-type.ts +2 -2
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import {SinglyLinkedList} from '../linked-list';
7
7
 
8
- export class SkipQueue<E = any> extends SinglyLinkedList<E> {
8
+ export class LinkedListQueue<E = any> extends SinglyLinkedList<E> {
9
9
  /**
10
10
  * The enqueue function adds a value to the end of an array.
11
11
  * @param {E} value - The value parameter represents the value that you want to add to the queue.
@@ -22,12 +22,20 @@ export class SkipQueue<E = any> extends SinglyLinkedList<E> {
22
22
  return this.shift();
23
23
  }
24
24
 
25
+ /**
26
+ * The `getFirst` function returns the value of the head node in a linked list, or `undefined` if the list is empty.
27
+ * @returns The `getFirst()` method is returning the value of the `head` node if it exists, otherwise it returns `undefined`.
28
+ */
29
+ getFirst(): E | undefined {
30
+ return this.head?.value;
31
+ }
32
+
25
33
  /**
26
34
  * The `peek` function returns the value of the head node in a linked list, or `undefined` if the list is empty.
27
35
  * @returns The `peek()` method is returning the value of the `head` node if it exists, otherwise it returns `undefined`.
28
36
  */
29
37
  peek(): E | undefined {
30
- return this.head?.value;
38
+ return this.getFirst();
31
39
  }
32
40
  }
33
41
 
@@ -43,26 +51,18 @@ export class Queue<E = any> {
43
51
  this._offset = 0;
44
52
  }
45
53
 
46
- private _nodes: E[];
54
+ protected _nodes: E[];
47
55
 
48
56
  get nodes(): E[] {
49
57
  return this._nodes;
50
58
  }
51
59
 
52
- set nodes(value: E[]) {
53
- this._nodes = value;
54
- }
55
-
56
- private _offset: number;
60
+ protected _offset: number;
57
61
 
58
62
  get offset(): number {
59
63
  return this._offset;
60
64
  }
61
65
 
62
- set offset(value: number) {
63
- this._offset = value;
64
- }
65
-
66
66
  /**
67
67
  * The size function returns the number of elements in an array.
68
68
  * @returns {number} The size of the array, which is the difference between the length of the array and the offset.
@@ -101,25 +101,34 @@ export class Queue<E = any> {
101
101
  shift(): E | undefined {
102
102
  if (this.size === 0) return undefined;
103
103
 
104
- const first = this.peek();
105
- this.offset += 1;
104
+ const first = this.getFirst();
105
+ this._offset += 1;
106
106
 
107
107
  if (this.offset * 2 < this.nodes.length) return first;
108
108
 
109
109
  // only delete dequeued elements when reaching half size
110
110
  // to decrease latency of shifting elements.
111
- this.nodes = this.nodes.slice(this.offset);
112
- this.offset = 0;
111
+ this._nodes = this.nodes.slice(this.offset);
112
+ this._offset = 0;
113
113
  return first;
114
114
  }
115
115
 
116
+ /**
117
+ * The `getFirst` function returns the first element of the array `_nodes` if it exists, otherwise it returns `null`.
118
+ * @returns The `getFirst()` method returns the first element of the data structure, represented by the `_nodes` array at
119
+ * the `_offset` index. If the data structure is empty (size is 0), it returns `null`.
120
+ */
121
+ getFirst(): E | undefined {
122
+ return this.size > 0 ? this.nodes[this.offset] : undefined;
123
+ }
124
+
116
125
  /**
117
126
  * The `peek` function returns the first element of the array `_nodes` if it exists, otherwise it returns `null`.
118
127
  * @returns The `peek()` method returns the first element of the data structure, represented by the `_nodes` array at
119
128
  * the `_offset` index. If the data structure is empty (size is 0), it returns `null`.
120
129
  */
121
130
  peek(): E | undefined {
122
- return this.size > 0 ? this.nodes[this.offset] : undefined;
131
+ return this.getFirst();
123
132
  }
124
133
 
125
134
  /**
@@ -131,6 +140,15 @@ export class Queue<E = any> {
131
140
  return this.size > 0 ? this.nodes[this.nodes.length - 1] : undefined;
132
141
  }
133
142
 
143
+ /**
144
+ * The `peekLast` function returns the last element in an array-like data structure, or null if the structure is empty.
145
+ * @returns The method `peekLast()` returns the last element of the `_nodes` array if the array is not empty. If the
146
+ * array is empty, it returns `null`.
147
+ */
148
+ peekLast(): E | undefined {
149
+ return this.getLast();
150
+ }
151
+
134
152
  /**
135
153
  * The enqueue function adds a value to the end of a queue.
136
154
  * @param {E} value - The value parameter represents the value that you want to add to the queue.
@@ -171,8 +189,8 @@ export class Queue<E = any> {
171
189
  * The clear function resets the nodes array and offset to their initial values.
172
190
  */
173
191
  clear(): void {
174
- this.nodes = [];
175
- this.offset = 0;
192
+ this._nodes = [];
193
+ this._offset = 0;
176
194
  }
177
195
 
178
196
  /**
@@ -183,7 +201,7 @@ export class Queue<E = any> {
183
201
  return new Queue(this.nodes.slice(this.offset));
184
202
  }
185
203
 
186
- *[Symbol.iterator]() {
204
+ * [Symbol.iterator]() {
187
205
  for (const item of this.nodes) {
188
206
  yield item;
189
207
  }
@@ -4,8 +4,6 @@
4
4
  * @class
5
5
  */
6
6
  export class Stack<E = any> {
7
- protected _elements: E[];
8
-
9
7
  /**
10
8
  * The constructor initializes an array of elements, which can be provided as an optional parameter.
11
9
  * @param {E[]} [elements] - The `elements` parameter is an optional parameter of type `E[]`, which represents an array
@@ -16,6 +14,12 @@ export class Stack<E = any> {
16
14
  this._elements = Array.isArray(elements) ? elements : [];
17
15
  }
18
16
 
17
+ protected _elements: E[];
18
+
19
+ get elements(): E[] {
20
+ return this._elements;
21
+ }
22
+
19
23
  /**
20
24
  * The function "fromArray" creates a new Stack object from an array of elements.
21
25
  * @param {E[]} elements - The `elements` parameter is an array of elements of type `E`.
@@ -31,7 +35,7 @@ export class Stack<E = any> {
31
35
  * @returns A boolean value indicating whether the `_elements` array is empty or not.
32
36
  */
33
37
  isEmpty(): boolean {
34
- return this._elements.length === 0;
38
+ return this.elements.length === 0;
35
39
  }
36
40
 
37
41
  /**
@@ -39,7 +43,7 @@ export class Stack<E = any> {
39
43
  * @returns The size of the elements array.
40
44
  */
41
45
  size(): number {
42
- return this._elements.length;
46
+ return this.elements.length;
43
47
  }
44
48
 
45
49
  /**
@@ -49,7 +53,7 @@ export class Stack<E = any> {
49
53
  peek(): E | null {
50
54
  if (this.isEmpty()) return null;
51
55
 
52
- return this._elements[this._elements.length - 1];
56
+ return this.elements[this.elements.length - 1];
53
57
  }
54
58
 
55
59
  /**
@@ -58,7 +62,7 @@ export class Stack<E = any> {
58
62
  * @returns The `push` method is returning the updated `Stack<E>` object.
59
63
  */
60
64
  push(element: E): Stack<E> {
61
- this._elements.push(element);
65
+ this.elements.push(element);
62
66
  return this;
63
67
  }
64
68
 
@@ -70,7 +74,7 @@ export class Stack<E = any> {
70
74
  pop(): E | null {
71
75
  if (this.isEmpty()) return null;
72
76
 
73
- return this._elements.pop() || null;
77
+ return this.elements.pop() || null;
74
78
  }
75
79
 
76
80
  /**
@@ -78,7 +82,7 @@ export class Stack<E = any> {
78
82
  * @returns An array of type E.
79
83
  */
80
84
  toArray(): E[] {
81
- return this._elements.slice();
85
+ return this.elements.slice();
82
86
  }
83
87
 
84
88
  /**
@@ -93,6 +97,6 @@ export class Stack<E = any> {
93
97
  * @returns The `clone()` method is returning a new `Stack` object with a copy of the `_elements` array.
94
98
  */
95
99
  clone(): Stack<E> {
96
- return new Stack(this._elements.slice());
100
+ return new Stack(this.elements.slice());
97
101
  }
98
102
  }
@@ -1,38 +1,12 @@
1
1
  export class TreeNode<V = any> {
2
- constructor(key: string, value?: V, children?: TreeNode<V>[]) {
3
- this._key = key;
4
- this._value = value || undefined;
5
- this._children = children || [];
6
- }
7
-
8
- private _key: string;
9
-
10
- get key(): string {
11
- return this._key;
12
- }
13
-
14
- set key(value: string) {
15
- this._key = value;
16
- }
17
-
18
- private _value?: V | undefined;
2
+ key: string;
3
+ value?: V | undefined;
4
+ children?: TreeNode<V>[] | undefined;
19
5
 
20
- get value(): V | undefined {
21
- return this._value;
22
- }
23
-
24
- set value(value: V | undefined) {
25
- this._value = value;
26
- }
27
-
28
- private _children?: TreeNode<V>[] | undefined;
29
-
30
- get children(): TreeNode<V>[] | undefined {
31
- return this._children;
32
- }
33
-
34
- set children(value: TreeNode<V>[] | undefined) {
35
- this._children = value;
6
+ constructor(key: string, value?: V, children?: TreeNode<V>[]) {
7
+ this.key = key;
8
+ this.value = value || undefined;
9
+ this.children = children || [];
36
10
  }
37
11
 
38
12
  addChildren(children: TreeNode<V> | TreeNode<V>[]) {
@@ -11,40 +11,14 @@
11
11
  * and a flag indicating whether it's the end of a word.
12
12
  */
13
13
  export class TrieNode {
14
- constructor(key: string) {
15
- this._key = key;
16
- this._isEnd = false;
17
- this._children = new Map<string, TrieNode>();
18
- }
19
-
20
- private _key;
21
-
22
- get key(): string {
23
- return this._key;
24
- }
25
-
26
- set key(v: string) {
27
- this._key = v;
28
- }
29
-
30
- protected _children: Map<string, TrieNode>;
31
-
32
- get children(): Map<string, TrieNode> {
33
- return this._children;
34
- }
35
-
36
- set children(v: Map<string, TrieNode>) {
37
- this._children = v;
38
- }
39
-
40
- protected _isEnd: boolean;
41
-
42
- get isEnd(): boolean {
43
- return this._isEnd;
44
- }
14
+ key: string;
15
+ children: Map<string, TrieNode>;
16
+ isEnd: boolean;
45
17
 
46
- set isEnd(v: boolean) {
47
- this._isEnd = v;
18
+ constructor(key: string) {
19
+ this.key = key;
20
+ this.isEnd = false;
21
+ this.children = new Map<string, TrieNode>();
48
22
  }
49
23
  }
50
24
 
@@ -52,8 +26,6 @@ export class TrieNode {
52
26
  * Trie represents a Trie data structure. It provides basic Trie operations and additional methods.
53
27
  */
54
28
  export class Trie {
55
- private readonly _caseSensitive: boolean;
56
-
57
29
  constructor(words?: string[], caseSensitive = true) {
58
30
  this._root = new TrieNode('');
59
31
  this._caseSensitive = caseSensitive;
@@ -64,16 +36,18 @@ export class Trie {
64
36
  }
65
37
  }
66
38
 
39
+ protected _caseSensitive: boolean;
40
+
41
+ get caseSensitive(): boolean {
42
+ return this._caseSensitive;
43
+ }
44
+
67
45
  protected _root: TrieNode;
68
46
 
69
47
  get root() {
70
48
  return this._root;
71
49
  }
72
50
 
73
- set root(v: TrieNode) {
74
- this._root = v;
75
- }
76
-
77
51
  /**
78
52
  * Add a word to the Trie structure.
79
53
  * @param {string} word - The word to add.
@@ -277,7 +251,7 @@ export class Trie {
277
251
  return words;
278
252
  }
279
253
 
280
- private _caseProcess(str: string) {
254
+ protected _caseProcess(str: string) {
281
255
  if (!this._caseSensitive) {
282
256
  str = str.toLowerCase(); // Convert str to lowercase if case-insensitive
283
257
  }
@@ -1,5 +1,5 @@
1
1
  import {BinaryTreeNode} from '../data-structures';
2
- import {BinaryTreeDeletedResult, BTNKey, BinaryTreeNodeNested, BTNCallback} from '../types';
2
+ import {BinaryTreeDeletedResult, BinaryTreeNodeNested, BTNCallback, BTNKey} from '../types';
3
3
 
4
4
  export interface IBinaryTree<V = any, N extends BinaryTreeNode<V, N> = BinaryTreeNodeNested<V>> {
5
5
  createNode(key: BTNKey, value?: N['value']): N;
@@ -1,5 +1,5 @@
1
1
  import {BSTNode} from '../../../data-structures';
2
- import type {BTNKey, BinaryTreeOptions} from './binary-tree';
2
+ import type {BinaryTreeOptions, BTNKey} from './binary-tree';
3
3
 
4
4
  export type BSTComparator = (a: BTNKey, b: BTNKey) => number;
5
5
 
@@ -1,8 +1,8 @@
1
- import {BinaryTreeOptions} from './binary-tree';
2
- import {RBTreeNode} from '../../../data-structures';
1
+ // import {BinaryTreeOptions} from './binary-tree';
2
+ // import {RBTreeNode} from '../../../data-structures';
3
3
 
4
- export enum RBColor { RED = 'RED', BLACK = 'BLACK'}
4
+ export enum RBTNColor { RED = 1, BLACK = 0}
5
5
 
6
- export type RBTreeNodeNested<T> = RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, any>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
7
-
8
- export type RBTreeOptions = BinaryTreeOptions & {}
6
+ // export type RBTreeNodeNested<T> = RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, RBTreeNode<T, any>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
7
+ //
8
+ // export type RBTreeOptions = BinaryTreeOptions & {}
@@ -1,6 +1,6 @@
1
1
  export type Direction = 'up' | 'right' | 'down' | 'left';
2
2
 
3
- export type Turning = {[key in Direction]: Direction};
3
+ export type Turning = { [key in Direction]: Direction };
4
4
 
5
5
  export type NavigatorParams<T = any> = {
6
6
  matrix: T[][];
@@ -1,5 +1,5 @@
1
1
  export type ToThunkFn = () => ReturnType<TrlFn>;
2
- export type Thunk = () => ReturnType<ToThunkFn> & {__THUNK__: symbol};
2
+ export type Thunk = () => ReturnType<ToThunkFn> & { __THUNK__: symbol };
3
3
  export type TrlFn = (...args: any[]) => any;
4
4
  export type TrlAsyncFn = (...args: any[]) => any;
5
5
 
@@ -1,6 +1,6 @@
1
- export type KeyValueObject = {[key: string]: any};
1
+ export type KeyValueObject = { [key: string]: any };
2
2
 
3
- export type KeyValueObjectWithKey = {[key: string]: any; key: string | number | symbol};
3
+ export type KeyValueObjectWithKey = { [key: string]: any; key: string | number | symbol };
4
4
 
5
5
  export type NonNumberNonObjectButDefined = string | boolean | symbol | null;
6
6