collect-your-stuff 2.1.2 → 2.2.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 (63) hide show
  1. package/README.md +32 -3926
  2. package/browser/collect-your-stuff.js +912 -549
  3. package/browser/collect-your-stuff.min.js +1 -1
  4. package/dist/collections/arrayable/ArrayElement.d.ts +6 -11
  5. package/dist/collections/arrayable/ArrayElement.js +5 -7
  6. package/dist/collections/arrayable/Arrayable.d.ts +22 -37
  7. package/dist/collections/arrayable/Arrayable.js +208 -223
  8. package/dist/collections/doubly-linked-list/DoubleLinker.d.ts +9 -14
  9. package/dist/collections/doubly-linked-list/DoubleLinker.js +71 -73
  10. package/dist/collections/doubly-linked-list/DoublyLinkedList.d.ts +19 -36
  11. package/dist/collections/doubly-linked-list/DoublyLinkedList.js +310 -327
  12. package/dist/collections/linked-list/LinkedList.d.ts +20 -36
  13. package/dist/collections/linked-list/LinkedList.js +283 -296
  14. package/dist/collections/linked-list/Linker.d.ts +8 -13
  15. package/dist/collections/linked-list/Linker.js +82 -84
  16. package/dist/collections/linked-tree-list/LinkedTreeList.d.ts +24 -43
  17. package/dist/collections/linked-tree-list/LinkedTreeList.js +274 -294
  18. package/dist/collections/linked-tree-list/TreeLinker.d.ts +14 -20
  19. package/dist/collections/linked-tree-list/TreeLinker.js +91 -94
  20. package/dist/collections/queue/Queue.d.ts +10 -14
  21. package/dist/collections/queue/Queue.js +114 -121
  22. package/dist/collections/queue/Queueable.d.ts +13 -22
  23. package/dist/collections/queue/Queueable.js +142 -148
  24. package/dist/collections/queue/TaskQueue.d.ts +8 -17
  25. package/dist/collections/queue/TaskQueue.js +128 -137
  26. package/dist/collections/scoped-collection/ScopedCollection.d.ts +42 -0
  27. package/dist/collections/scoped-collection/ScopedCollection.js +81 -0
  28. package/dist/collections/scoped-collection/ScopedCollection.min.js +1 -0
  29. package/dist/collections/stack/Stack.d.ts +11 -15
  30. package/dist/collections/stack/Stack.js +122 -129
  31. package/dist/collections/stack/Stackable.d.ts +9 -16
  32. package/dist/collections/stack/Stackable.js +81 -85
  33. package/dist/collections/stack/TaskStack.d.ts +8 -17
  34. package/dist/collections/stack/TaskStack.js +98 -107
  35. package/dist/main.d.ts +67 -68
  36. package/dist/main.js +8 -4
  37. package/dist/main.min.js +1 -1
  38. package/dist/recipes/ArrayIterator.d.ts +4 -4
  39. package/dist/recipes/ArrayIterator.js +4 -4
  40. package/dist/recipes/DoubleLinkerIterator.d.ts +3 -3
  41. package/dist/recipes/DoubleLinkerIterator.js +3 -3
  42. package/dist/recipes/IsArrayable.d.ts +13 -33
  43. package/dist/recipes/IsQueue.d.ts +4 -9
  44. package/dist/recipes/IsScopedCollection.d.ts +27 -0
  45. package/dist/recipes/IsScopedCollection.js +5 -0
  46. package/dist/recipes/IsScopedCollection.min.js +1 -0
  47. package/dist/recipes/IsStack.d.ts +4 -9
  48. package/dist/recipes/IsTreeNode.d.ts +1 -1
  49. package/dist/recipes/LinkerIterator.d.ts +3 -3
  50. package/dist/recipes/LinkerIterator.js +3 -3
  51. package/dist/recipes/Runnable.d.ts +3 -16
  52. package/dist/recipes/Runnable.js +3 -9
  53. package/dist/recipes/TreeLinkerIterator.d.ts +4 -4
  54. package/dist/recipes/TreeLinkerIterator.js +36 -36
  55. package/dist/recipes/recipes.d.ts +1 -4
  56. package/dist/recipes/recipes.js +19 -22
  57. package/dist/services/parseTree.d.ts +2 -3
  58. package/dist/services/parseTree.js +23 -24
  59. package/dist/services/parseTreeNext.d.ts +2 -3
  60. package/dist/services/parseTreeNext.js +2 -3
  61. package/dist/services/services.d.ts +1 -4
  62. package/dist/services/services.js +19 -22
  63. package/package.json +4 -4
@@ -1,296 +1,283 @@
1
- 'use strict'
2
-
3
- Object.defineProperty(exports, '__esModule', {
4
- value: true
5
- })
6
- exports.LinkedList = void 0
7
- const _Linker = require('./Linker')
8
- const _LinkerIterator = require('../../recipes/LinkerIterator')
9
- const _Arrayable = require('../arrayable/Arrayable')
10
- /**
11
- * LinkedList represents a collection stored as a LinkedList with next references.
12
- * @extends Arrayable
13
- */
14
- class LinkedList {
15
- /**
16
- * Create the new LinkedList instance.
17
- * @param {Linker} [linkerClass=Linker] The class used to wrap given data as linkers.
18
- */
19
- constructor (linkerClass = _Linker.Linker) {
20
- /** The class used to create this instance, so that it can be recognized as valid without an instanceof check. */
21
- this.classType = LinkedList
22
- /** The first linker of the list (null when the list is empty), from which the whole list is reached. */
23
- this.innerList = null
24
- /** Whether the inner list has been initialized (it can only be initialized once). */
25
- this.initialized = false
26
- /** The last linker, remembered so that adding to the end does not need to walk the whole list (null when not known yet). */
27
- this.tailCache = null
28
- /** The number of linkers, kept up to date by the list's own methods so that the length does not need to walk the whole list (null when not known yet). */
29
- this.countCache = null
30
- this.linkerClass = linkerClass
31
- }
32
-
33
- /**
34
- * Initialize the inner list, should only run once.
35
- * @param {Linker|Array} initialList Give the list of linkers to start in this linked-list.
36
- * @return {LinkedList}
37
- */
38
- initialize (initialList) {
39
- // Borrowed from Arrayable, which types its return as an Arrayable although it returns whatever list called it
40
- return _Arrayable.Arrayable.prototype.initialize.call(this, initialList)
41
- }
42
-
43
- /**
44
- * Retrieve the innerList used (the list itself, not a copy).
45
- * @returns {Linker}
46
- */
47
- get list () {
48
- return this.innerList
49
- }
50
-
51
- /**
52
- * Retrieve the first Linker in the list.
53
- * @returns {Linker}
54
- */
55
- get first () {
56
- return this.innerList
57
- }
58
-
59
- /**
60
- * Retrieve the last Linker in the list. The end is remembered, so this does not walk the list.
61
- * @returns {Linker}
62
- */
63
- get last () {
64
- if (this.innerList === null) {
65
- return null
66
- }
67
- let tail = this.tailCache !== null ? this.tailCache : this.innerList
68
- // The remembered tail is normally the end already, walking on from it also finds anything linked on outside of this list
69
- while (tail.next !== null) {
70
- tail = tail.next
71
- }
72
- this.tailCache = tail
73
- return tail
74
- }
75
-
76
- /**
77
- * Return the length of the list. It is kept up to date by the list's own methods, so this does not walk the list
78
- * (call reset() after linkers were changed directly).
79
- * @returns {number}
80
- */
81
- get length () {
82
- if (this.countCache === null) {
83
- this.reset()
84
- }
85
- return this.countCache
86
- }
87
-
88
- /**
89
- * Insert a new node (or data) after a node.
90
- * @param {Linker|*} node The existing node as reference, or null to insert at the start of the list
91
- * @param {Linker|*} newNode The new node to go after the existing node
92
- * @returns {LinkedList}
93
- */
94
- insertAfter (node, newNode) {
95
- newNode = this.linkerClass.make(newNode, this.linkerClass)
96
- if (node === null || typeof node === 'undefined') {
97
- // After nothing means at the start of the list
98
- newNode.next = this.innerList
99
- if (this.innerList === null) {
100
- this.tailCache = newNode
101
- }
102
- this.innerList = newNode
103
- } else {
104
- newNode.next = node.next
105
- node.next = newNode
106
- if (newNode.next === null) {
107
- this.tailCache = newNode
108
- }
109
- }
110
- if (this.countCache !== null) {
111
- ++this.countCache
112
- }
113
- return this
114
- }
115
-
116
- /**
117
- * Insert a new node (or data) before a node.
118
- * @param {Linker|*} node The existing node as reference, or null to insert at the end of the list
119
- * @param {Linker|*} newNode The new node to go before the existing node
120
- * @returns {LinkedList}
121
- * @throws {Error} When the reference node is not in this list
122
- */
123
- insertBefore (node, newNode) {
124
- newNode = this.linkerClass.make(newNode, this.linkerClass)
125
- if (node === null || typeof node === 'undefined') {
126
- // Before nothing means at the end of the list
127
- const tail = this.last
128
- newNode.next = null
129
- if (tail === null) {
130
- this.innerList = newNode
131
- } else {
132
- tail.next = newNode
133
- }
134
- this.tailCache = newNode
135
- } else {
136
- let prevNode = null
137
- let currentNode = this.first
138
- while (currentNode !== null && currentNode !== node) {
139
- prevNode = currentNode
140
- currentNode = currentNode.next
141
- }
142
- if (currentNode === null) {
143
- throw new Error('The reference node is not in this list.')
144
- }
145
- newNode.next = node
146
- if (prevNode) {
147
- prevNode.next = newNode
148
- } else {
149
- this.innerList = newNode
150
- }
151
- }
152
- if (this.countCache !== null) {
153
- ++this.countCache
154
- }
155
- return this
156
- }
157
-
158
- /**
159
- * Add a node (or data) after the given (or last) node in the list.
160
- * @param {Linker|*} node The new node to add to the end of the list
161
- * @param {Linker} after The existing last node
162
- * @returns {Linker}
163
- */
164
- append (node, after = this.last) {
165
- return this.insertAfter(after, node)
166
- }
167
-
168
- /**
169
- * Add a node (or data) before the given (or first) node in the list.
170
- * @param {Linker|*} node The new node to add to the start of the list
171
- * @param {Linker} before The existing first node
172
- * @returns {Linker}
173
- */
174
- prepend (node, before = this.first) {
175
- return this.insertBefore(before, node)
176
- }
177
-
178
- /**
179
- * Remove a linker from this linked list.
180
- * @param {Linker} node The node we wish to remove (and it will be returned after removal)
181
- * @return {Linker|null} The removed node, or null when it was not in this list (nothing is removed)
182
- */
183
- remove (node) {
184
- if (node === null || typeof node === 'undefined') {
185
- return null
186
- }
187
- let prevNode = null
188
- let currentNode = this.first
189
- while (currentNode !== null && currentNode !== node) {
190
- prevNode = currentNode
191
- currentNode = currentNode.next
192
- }
193
- if (currentNode === null) {
194
- // The node is not in this list, so there is nothing to remove
195
- return null
196
- }
197
- if (prevNode) {
198
- prevNode.next = node.next
199
- } else {
200
- this.innerList = node.next
201
- }
202
- if (this.tailCache === node) {
203
- this.tailCache = prevNode
204
- }
205
- if (this.innerList === null) {
206
- this.tailCache = null
207
- }
208
- if (this.countCache !== null) {
209
- --this.countCache
210
- }
211
- return node
212
- }
213
-
214
- /**
215
- * Refresh the remembered end and length of the list by walking it once. The list's own methods keep these up to date,
216
- * so this is only needed after linkers were changed directly (for example by setting next on a linker).
217
- * @return {Linker|null} The first linker of the list
218
- */
219
- reset () {
220
- let count = 0
221
- let tail = null
222
- let current = this.innerList
223
- while (current !== null) {
224
- ++count
225
- tail = current
226
- current = current.next
227
- }
228
- this.countCache = count
229
- this.tailCache = tail
230
- return this.innerList
231
- }
232
-
233
- /**
234
- * Retrieve a Linker item from this list by numeric index, otherwise return null.
235
- * @param {number} index The integer number for retrieving a node by position.
236
- * @returns {Linker|null}
237
- */
238
- item (index) {
239
- if (index >= 0) {
240
- let current = this.first
241
- let currentIndex = -1
242
- while (++currentIndex < index && current !== null) {
243
- current = current.next
244
- }
245
- return currentIndex === index ? current : null
246
- }
247
- let current = this.first
248
- let currentIndex = 0
249
- const calculatedIndex = this.length + index
250
- if (calculatedIndex < 0) {
251
- return null
252
- }
253
- while (currentIndex < calculatedIndex && current !== null) {
254
- current = current.next
255
- ++currentIndex
256
- }
257
- return currentIndex === calculatedIndex ? current : null
258
- }
259
-
260
- /**
261
- * Be able to run forEach on this LinkedList to iterate over the linkers.
262
- * @param {forEachCallback} callback The function to call for-each linker
263
- * @param {LinkedList} thisArg Optional, 'this' reference
264
- * @returns {LinkedList}
265
- */
266
- forEach (callback, thisArg = this) {
267
- let index = 0
268
- let current = thisArg.first
269
- while (current !== null) {
270
- callback(current, index, thisArg)
271
- current = current.next
272
- ++index
273
- }
274
- return thisArg
275
- }
276
-
277
- /**
278
- * Be able to iterate over this class.
279
- * @returns {Iterator}
280
- */
281
- [Symbol.iterator] () {
282
- return new _LinkerIterator.LinkerIterator(this.first)
283
- }
284
- }
285
- /**
286
- * Convert an array to a LinkedList.
287
- * @param {Array} values An array of values which will be converted to linkers in this linked-list
288
- * @param {IsLinker} linkerClass The class to use for each linker
289
- * @param {IsArrayable<Linker>} [classType=LinkedList] Provide the type of IsArrayable to use.
290
- * @returns {LinkedList}
291
- */
292
- exports.LinkedList = LinkedList
293
- LinkedList.fromArray = (values = [], linkerClass = _Linker.Linker, classType = LinkedList) => {
294
- const list = new classType(linkerClass)
295
- return list.initialize(linkerClass.fromArray(values).head)
296
- }
1
+ 'use strict'
2
+
3
+ Object.defineProperty(exports, '__esModule', {
4
+ value: true
5
+ })
6
+ exports.LinkedList = void 0
7
+ const _Linker = require('./Linker')
8
+ const _LinkerIterator = require('../../recipes/LinkerIterator')
9
+ const _Arrayable = require('../arrayable/Arrayable')
10
+ /**
11
+ * LinkedList represents a collection stored as a LinkedList with next references.
12
+ * @extends Arrayable
13
+ */
14
+ class LinkedList {
15
+ /**
16
+ * Create the new LinkedList instance.
17
+ * @param linkerClass The class used to wrap given data as linkers.
18
+ */
19
+ constructor (linkerClass = _Linker.Linker) {
20
+ /** The class used to create this instance, so that it can be recognized as valid without an instanceof check. */
21
+ this.classType = LinkedList
22
+ /** The first linker of the list (null when the list is empty), from which the whole list is reached. */
23
+ this.innerList = null
24
+ /** Whether the inner list has been initialized (it can only be initialized once). */
25
+ this.initialized = false
26
+ /** The last linker, remembered so that adding to the end does not need to walk the whole list (null when not known yet). */
27
+ this.tailCache = null
28
+ /** The number of linkers, kept up to date by the list's own methods so that the length does not need to walk the whole list (null when not known yet). */
29
+ this.countCache = null
30
+ this.linkerClass = linkerClass
31
+ }
32
+
33
+ /**
34
+ * Initialize the inner list, should only run once.
35
+ * @param initialList Give the list of linkers to start in this linked-list.
36
+ */
37
+ initialize (initialList) {
38
+ // Borrowed from Arrayable, which types its return as an Arrayable although it returns whatever list called it
39
+ return _Arrayable.Arrayable.prototype.initialize.call(this, initialList)
40
+ }
41
+
42
+ /**
43
+ * Retrieve the innerList used (the list itself, not a copy).
44
+ */
45
+ get list () {
46
+ return this.innerList
47
+ }
48
+
49
+ /**
50
+ * Retrieve the first Linker in the list.
51
+ */
52
+ get first () {
53
+ return this.innerList
54
+ }
55
+
56
+ /**
57
+ * Retrieve the last Linker in the list. The end is remembered, so this does not walk the list.
58
+ */
59
+ get last () {
60
+ if (this.innerList === null) {
61
+ return null
62
+ }
63
+ let tail = this.tailCache !== null ? this.tailCache : this.innerList
64
+ // The remembered tail is normally the end already, walking on from it also finds anything linked on outside of this list
65
+ while (tail.next !== null) {
66
+ tail = tail.next
67
+ }
68
+ this.tailCache = tail
69
+ return tail
70
+ }
71
+
72
+ /**
73
+ * Return the length of the list. It is kept up to date by the list's own methods, so this does not walk the list
74
+ * (call reset() after linkers were changed directly).
75
+ */
76
+ get length () {
77
+ if (this.countCache === null) {
78
+ this.reset()
79
+ }
80
+ return this.countCache
81
+ }
82
+
83
+ /**
84
+ * Insert a new node (or data) after a node.
85
+ * @param node The existing node as reference, or null to insert at the start of the list
86
+ * @param newNode The new node to go after the existing node
87
+ */
88
+ insertAfter (node, newNode) {
89
+ newNode = this.linkerClass.make(newNode, this.linkerClass)
90
+ if (node === null || typeof node === 'undefined') {
91
+ // After nothing means at the start of the list
92
+ newNode.next = this.innerList
93
+ if (this.innerList === null) {
94
+ this.tailCache = newNode
95
+ }
96
+ this.innerList = newNode
97
+ } else {
98
+ newNode.next = node.next
99
+ node.next = newNode
100
+ if (newNode.next === null) {
101
+ this.tailCache = newNode
102
+ }
103
+ }
104
+ if (this.countCache !== null) {
105
+ ++this.countCache
106
+ }
107
+ return this
108
+ }
109
+
110
+ /**
111
+ * Insert a new node (or data) before a node.
112
+ * @param node The existing node as reference, or null to insert at the end of the list
113
+ * @param newNode The new node to go before the existing node
114
+ * @throws {Error} When the reference node is not in this list
115
+ */
116
+ insertBefore (node, newNode) {
117
+ newNode = this.linkerClass.make(newNode, this.linkerClass)
118
+ if (node === null || typeof node === 'undefined') {
119
+ // Before nothing means at the end of the list
120
+ const tail = this.last
121
+ newNode.next = null
122
+ if (tail === null) {
123
+ this.innerList = newNode
124
+ } else {
125
+ tail.next = newNode
126
+ }
127
+ this.tailCache = newNode
128
+ } else {
129
+ let prevNode = null
130
+ let currentNode = this.first
131
+ while (currentNode !== null && currentNode !== node) {
132
+ prevNode = currentNode
133
+ currentNode = currentNode.next
134
+ }
135
+ if (currentNode === null) {
136
+ throw new Error('The reference node is not in this list.')
137
+ }
138
+ newNode.next = node
139
+ if (prevNode) {
140
+ prevNode.next = newNode
141
+ } else {
142
+ this.innerList = newNode
143
+ }
144
+ }
145
+ if (this.countCache !== null) {
146
+ ++this.countCache
147
+ }
148
+ return this
149
+ }
150
+
151
+ /**
152
+ * Add a node (or data) after the given (or last) node in the list.
153
+ * @param node The new node to add to the end of the list
154
+ * @param after The existing last node
155
+ */
156
+ append (node, after = this.last) {
157
+ return this.insertAfter(after, node)
158
+ }
159
+
160
+ /**
161
+ * Add a node (or data) before the given (or first) node in the list.
162
+ * @param node The new node to add to the start of the list
163
+ * @param before The existing first node
164
+ */
165
+ prepend (node, before = this.first) {
166
+ return this.insertBefore(before, node)
167
+ }
168
+
169
+ /**
170
+ * Remove a linker from this linked list.
171
+ * @param node The node we wish to remove (and it will be returned after removal)
172
+ * @returns The removed node, or null when it was not in this list (nothing is removed)
173
+ */
174
+ remove (node) {
175
+ if (node === null || typeof node === 'undefined') {
176
+ return null
177
+ }
178
+ let prevNode = null
179
+ let currentNode = this.first
180
+ while (currentNode !== null && currentNode !== node) {
181
+ prevNode = currentNode
182
+ currentNode = currentNode.next
183
+ }
184
+ if (currentNode === null) {
185
+ // The node is not in this list, so there is nothing to remove
186
+ return null
187
+ }
188
+ if (prevNode) {
189
+ prevNode.next = node.next
190
+ } else {
191
+ this.innerList = node.next
192
+ }
193
+ if (this.tailCache === node) {
194
+ this.tailCache = prevNode
195
+ }
196
+ if (this.innerList === null) {
197
+ this.tailCache = null
198
+ }
199
+ if (this.countCache !== null) {
200
+ --this.countCache
201
+ }
202
+ return node
203
+ }
204
+
205
+ /**
206
+ * Refresh the remembered end and length of the list by walking it once. The list's own methods keep these up to date,
207
+ * so this is only needed after linkers were changed directly (for example by setting next on a linker).
208
+ * @returns The first linker of the list
209
+ */
210
+ reset () {
211
+ let count = 0
212
+ let tail = null
213
+ let current = this.innerList
214
+ while (current !== null) {
215
+ ++count
216
+ tail = current
217
+ current = current.next
218
+ }
219
+ this.countCache = count
220
+ this.tailCache = tail
221
+ return this.innerList
222
+ }
223
+
224
+ /**
225
+ * Retrieve a Linker item from this list by numeric index, otherwise return null.
226
+ * @param index The integer number for retrieving a node by position.
227
+ */
228
+ item (index) {
229
+ if (index >= 0) {
230
+ let current = this.first
231
+ let currentIndex = -1
232
+ while (++currentIndex < index && current !== null) {
233
+ current = current.next
234
+ }
235
+ return currentIndex === index ? current : null
236
+ }
237
+ let current = this.first
238
+ let currentIndex = 0
239
+ const calculatedIndex = this.length + index
240
+ if (calculatedIndex < 0) {
241
+ return null
242
+ }
243
+ while (currentIndex < calculatedIndex && current !== null) {
244
+ current = current.next
245
+ ++currentIndex
246
+ }
247
+ return currentIndex === calculatedIndex ? current : null
248
+ }
249
+
250
+ /**
251
+ * Be able to run forEach on this LinkedList to iterate over the linkers.
252
+ * @param callback The function to call for-each linker
253
+ * @param thisArg Optional, 'this' reference
254
+ */
255
+ forEach (callback, thisArg = this) {
256
+ let index = 0
257
+ let current = thisArg.first
258
+ while (current !== null) {
259
+ callback(current, index, thisArg)
260
+ current = current.next
261
+ ++index
262
+ }
263
+ return thisArg
264
+ }
265
+
266
+ /**
267
+ * Be able to iterate over this class.
268
+ */
269
+ [Symbol.iterator] () {
270
+ return new _LinkerIterator.LinkerIterator(this.first)
271
+ }
272
+ }
273
+ /**
274
+ * Convert an array to a LinkedList.
275
+ * @param values An array of values which will be converted to linkers in this linked-list
276
+ * @param linkerClass The class to use for each linker
277
+ * @param classType Provide the type of IsArrayable to use.
278
+ */
279
+ exports.LinkedList = LinkedList
280
+ LinkedList.fromArray = (values = [], linkerClass = _Linker.Linker, classType = LinkedList) => {
281
+ const list = new classType(linkerClass)
282
+ return list.initialize(linkerClass.fromArray(values).head)
283
+ }
@@ -1,8 +1,5 @@
1
1
  /**
2
- * @file linked list item.
3
- * @author Joshua Heagle <joshuaheagle@gmail.com>
4
- * @version 1.1.0
5
- * @memberOf module:collect-your-stuff
2
+ * linked list item.
6
3
  */
7
4
  import { IsLinker } from '../../recipes/IsLinker';
8
5
  /**
@@ -18,9 +15,9 @@ export declare class Linker implements IsLinker {
18
15
  next: Linker | null;
19
16
  /**
20
17
  * Create the new Linker instance, provide the data and optionally give the next Linker.
21
- * @param {Object} [nodeData={}] The settings for the new linker.
22
- * @param {*} [nodeData.data=null] The data to be stored in this linker
23
- * @param {Linker|null} [nodeData.next=null] The reference to the next linker if any
18
+ * @param nodeData The settings for the new linker.
19
+ * @param nodeData.data The data to be stored in this linker
20
+ * @param nodeData.next The reference to the next linker if any
24
21
  */
25
22
  constructor({ data, next }?: {
26
23
  data?: any;
@@ -28,16 +25,14 @@ export declare class Linker implements IsLinker {
28
25
  });
29
26
  /**
30
27
  * Make a new Linker from the data given if it is not already a valid Linker.
31
- * @param {Linker|*} linker Return a valid Linker instance from given data, or even an already valid one.
32
- * @param {IsLinker} [classType=Linker] Provide the type of IsLinker to use.
33
- * @return {Linker}
28
+ * @param linker Return a valid Linker instance from given data, or even an already valid one.
29
+ * @param classType Provide the type of IsLinker to use.
34
30
  */
35
31
  static make: (linker: Linker | any, classType?: any) => IsLinker | any;
36
32
  /**
37
33
  * Convert an array into Linker instances, return the head and tail Linkers.
38
- * @param {Array} [values=[]] Provide an array of data that will be converted to a chain of linkers.
39
- * @param {IsLinker} [classType=Linker] Provide the type of IsLinker to use.
40
- * @returns {{head: Linker, tail: Linker}}
34
+ * @param values Provide an array of data that will be converted to a chain of linkers.
35
+ * @param classType Provide the type of IsLinker to use.
41
36
  */
42
37
  static fromArray: (values?: Array<any>, classType?: any) => {
43
38
  head: IsLinker;