collect-your-stuff 1.2.6 → 1.2.8
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/README.md +2525 -2525
- package/browser/collect-your-stuff.js +22766 -22859
- package/browser/collect-your-stuff.min.js +1 -1
- package/dist/collections/arrayable/ArrayElement.d.ts +36 -36
- package/dist/collections/arrayable/ArrayElement.js +64 -70
- package/dist/collections/arrayable/ArrayElement.min.js +1 -1
- package/dist/collections/arrayable/Arrayable.d.ts +108 -108
- package/dist/collections/arrayable/Arrayable.js +188 -196
- package/dist/collections/arrayable/Arrayable.min.js +1 -1
- package/dist/collections/doubly-linked-list/DoubleLinker.d.ts +46 -46
- package/dist/collections/doubly-linked-list/DoubleLinker.js +69 -77
- package/dist/collections/doubly-linked-list/DoubleLinker.min.js +1 -1
- package/dist/collections/doubly-linked-list/DoublyLinkedList.d.ts +113 -113
- package/dist/collections/doubly-linked-list/DoublyLinkedList.js +274 -277
- package/dist/collections/doubly-linked-list/DoublyLinkedList.min.js +1 -1
- package/dist/collections/linked-list/LinkedList.d.ts +109 -109
- package/dist/collections/linked-list/LinkedList.js +233 -241
- package/dist/collections/linked-list/LinkedList.min.js +1 -1
- package/dist/collections/linked-list/Linker.d.ts +43 -43
- package/dist/collections/linked-list/Linker.js +80 -86
- package/dist/collections/linked-list/Linker.min.js +1 -1
- package/dist/collections/linked-tree-list/LinkedTreeList.d.ts +135 -135
- package/dist/collections/linked-tree-list/LinkedTreeList.js +252 -261
- package/dist/collections/linked-tree-list/LinkedTreeList.min.js +1 -1
- package/dist/collections/linked-tree-list/TreeLinker.d.ts +63 -63
- package/dist/collections/linked-tree-list/TreeLinker.js +79 -92
- package/dist/collections/linked-tree-list/TreeLinker.min.js +1 -1
- package/dist/collections/queue/Queue.d.ts +63 -63
- package/dist/collections/queue/Queue.js +130 -136
- package/dist/collections/queue/Queue.min.js +1 -1
- package/dist/collections/queue/Queueable.d.ts +77 -77
- package/dist/collections/queue/Queueable.js +141 -151
- package/dist/collections/queue/Queueable.min.js +1 -1
- package/dist/collections/stack/Stack.d.ts +63 -63
- package/dist/collections/stack/Stack.js +106 -112
- package/dist/collections/stack/Stack.min.js +1 -1
- package/dist/collections/stack/Stackable.d.ts +56 -56
- package/dist/collections/stack/Stackable.js +83 -91
- package/dist/collections/stack/Stackable.min.js +1 -1
- package/dist/main.d.ts +40 -40
- package/dist/main.js +50 -50
- package/dist/recipes/ArrayIterator.d.ts +10 -10
- package/dist/recipes/ArrayIterator.js +29 -30
- package/dist/recipes/ArrayIterator.min.js +1 -1
- package/dist/recipes/DoubleLinkerIterator.d.ts +9 -9
- package/dist/recipes/DoubleLinkerIterator.js +24 -24
- package/dist/recipes/IsArrayable.d.ts +105 -105
- package/dist/recipes/IsArrayable.js +5 -5
- package/dist/recipes/IsDoubleLinker.d.ts +14 -14
- package/dist/recipes/IsDoubleLinker.js +5 -5
- package/dist/recipes/IsElement.d.ts +14 -14
- package/dist/recipes/IsElement.js +5 -5
- package/dist/recipes/IsLinker.d.ts +10 -10
- package/dist/recipes/IsLinker.js +5 -5
- package/dist/recipes/IsTree.d.ts +11 -11
- package/dist/recipes/IsTree.js +5 -5
- package/dist/recipes/IsTreeNode.d.ts +29 -29
- package/dist/recipes/IsTreeNode.js +5 -5
- package/dist/recipes/LinkerIterator.d.ts +9 -9
- package/dist/recipes/LinkerIterator.js +24 -24
- package/dist/recipes/Runnable.d.ts +54 -54
- package/dist/recipes/Runnable.js +68 -69
- package/dist/recipes/Runnable.min.js +1 -1
- package/dist/recipes/TreeLinkerIterator.d.ts +9 -9
- package/dist/recipes/TreeLinkerIterator.js +25 -25
- package/dist/recipes/recipes.d.ts +15 -15
- package/dist/recipes/recipes.js +22 -22
- package/dist/services/parseTree.d.ts +9 -9
- package/dist/services/parseTree.js +24 -24
- package/dist/services/parseTreeNext.d.ts +14 -14
- package/dist/services/parseTreeNext.js +47 -47
- package/dist/services/services.d.ts +13 -13
- package/dist/services/services.js +22 -22
- package/package.json +2 -2
|
@@ -1,136 +1,130 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', {
|
|
4
|
-
value: true
|
|
5
|
-
})
|
|
6
|
-
exports.Queue = void 0
|
|
7
|
-
var _Queueable = require('./Queueable')
|
|
8
|
-
var _LinkedList = require('../linked-list/LinkedList')
|
|
9
|
-
/**
|
|
10
|
-
* @file queue
|
|
11
|
-
* @author Joshua Heagle <joshuaheagle@gmail.com>
|
|
12
|
-
* @version 1.1.0
|
|
13
|
-
* @memberOf module:collect-your-stuff
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Maintain a series of queued items.
|
|
18
|
-
*/
|
|
19
|
-
class Queue {
|
|
20
|
-
/**
|
|
21
|
-
* Instantiate the queue with the given queue list.
|
|
22
|
-
* @param {Iterable|LinkedList} queuedList Give the list of queueables to start in this queue.
|
|
23
|
-
* @param {IsArrayable} listClass
|
|
24
|
-
* @param {Queueable} queueableClass
|
|
25
|
-
*/
|
|
26
|
-
constructor () {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
return
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
*
|
|
123
|
-
* @
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
Queue
|
|
130
|
-
|
|
131
|
-
const queueableClass = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _Queueable.Queueable
|
|
132
|
-
const listClass = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _LinkedList.LinkedList
|
|
133
|
-
const list = new listClass(queueableClass)
|
|
134
|
-
list.initialize(queueableClass.fromArray(values, queueableClass).head)
|
|
135
|
-
return new Queue(list, listClass, queueableClass)
|
|
136
|
-
}
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
})
|
|
6
|
+
exports.Queue = void 0
|
|
7
|
+
var _Queueable = require('./Queueable')
|
|
8
|
+
var _LinkedList = require('../linked-list/LinkedList')
|
|
9
|
+
/**
|
|
10
|
+
* @file queue
|
|
11
|
+
* @author Joshua Heagle <joshuaheagle@gmail.com>
|
|
12
|
+
* @version 1.1.0
|
|
13
|
+
* @memberOf module:collect-your-stuff
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Maintain a series of queued items.
|
|
18
|
+
*/
|
|
19
|
+
class Queue {
|
|
20
|
+
/**
|
|
21
|
+
* Instantiate the queue with the given queue list.
|
|
22
|
+
* @param {Iterable|LinkedList} queuedList Give the list of queueables to start in this queue.
|
|
23
|
+
* @param {IsArrayable} listClass
|
|
24
|
+
* @param {Queueable} queueableClass
|
|
25
|
+
*/
|
|
26
|
+
constructor (queuedList = null, listClass = _LinkedList.LinkedList, queueableClass = _Queueable.Queueable) {
|
|
27
|
+
this.listClass = listClass
|
|
28
|
+
this.queueableClass = queueableClass
|
|
29
|
+
if (queuedList === null) {
|
|
30
|
+
queuedList = new listClass(queueableClass)
|
|
31
|
+
}
|
|
32
|
+
this.queuedList = queuedList
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Take a queued task from the front of the queue and run it if ready.
|
|
37
|
+
* @return {completeResponse|*}
|
|
38
|
+
*/
|
|
39
|
+
dequeue () {
|
|
40
|
+
const next = this.remove()
|
|
41
|
+
if (!next) {
|
|
42
|
+
return {
|
|
43
|
+
success: 'No more queueable tasks in the queue',
|
|
44
|
+
error: false,
|
|
45
|
+
context: this.queuedList
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if (next.complete) {
|
|
49
|
+
// Previously ran queued, run next
|
|
50
|
+
return this.dequeue()
|
|
51
|
+
}
|
|
52
|
+
if (next.running) {
|
|
53
|
+
return {
|
|
54
|
+
success: false,
|
|
55
|
+
error: 'The queue has been blocked by an unfinished task.',
|
|
56
|
+
context: next
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
if (!this.empty()) {
|
|
60
|
+
// Place back in queue to be checked once again next time, only if the queue will not be empty
|
|
61
|
+
this.enqueue(next)
|
|
62
|
+
}
|
|
63
|
+
if (next.isReady) {
|
|
64
|
+
return next.run.call(next)
|
|
65
|
+
}
|
|
66
|
+
// We could go check the next in queue here but if we end up in a state where nothing is ready it would infinite loop
|
|
67
|
+
// Also, we want the loop handled externally
|
|
68
|
+
return {
|
|
69
|
+
success: false,
|
|
70
|
+
error: 'Unable to find ready task.',
|
|
71
|
+
context: next
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Return true if the queue is empty (there are no tasks in the queue list)
|
|
77
|
+
* @return {boolean}
|
|
78
|
+
*/
|
|
79
|
+
empty () {
|
|
80
|
+
return this.size() <= 0
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Add a queued task to the end of the queue
|
|
85
|
+
* @param {Queueable} queueable Add a new queueable to the end of the queue
|
|
86
|
+
*/
|
|
87
|
+
enqueue (queueable) {
|
|
88
|
+
this.queuedList.append(queueable)
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Take a look at the next queued task
|
|
93
|
+
* @return {Queueable}
|
|
94
|
+
*/
|
|
95
|
+
peek () {
|
|
96
|
+
return this.queuedList.first
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Remove the next queued item and return it.
|
|
101
|
+
* @return {Queueable|null}
|
|
102
|
+
*/
|
|
103
|
+
remove () {
|
|
104
|
+
if (this.empty()) {
|
|
105
|
+
return null
|
|
106
|
+
}
|
|
107
|
+
return this.queuedList.remove(this.queuedList.first)
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Get the length of the current queue.
|
|
112
|
+
* @return {number}
|
|
113
|
+
*/
|
|
114
|
+
size () {
|
|
115
|
+
return this.queuedList.length
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Convert an array to a Queue.
|
|
120
|
+
* @param {Array} values An array of values which will be converted to queueables in this queue
|
|
121
|
+
* @param {Queueable} queueableClass The class to use for each queueable
|
|
122
|
+
* @param {Queue|Iterable} listClass The class to use to manage the queueables
|
|
123
|
+
* @returns {Queue}
|
|
124
|
+
*/
|
|
125
|
+
exports.Queue = Queue
|
|
126
|
+
Queue.fromArray = (values = [], queueableClass = _Queueable.Queueable, listClass = _LinkedList.LinkedList) => {
|
|
127
|
+
const list = new listClass(queueableClass)
|
|
128
|
+
list.initialize(queueableClass.fromArray(values, queueableClass).head)
|
|
129
|
+
return new Queue(list, listClass, queueableClass)
|
|
130
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Queue=void 0;var _Queueable=require("./Queueable"),_LinkedList=require("../linked-list/LinkedList");class Queue{constructor(
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Queue=void 0;var _Queueable=require("./Queueable"),_LinkedList=require("../linked-list/LinkedList");class Queue{constructor(e=null,u=_LinkedList.LinkedList,t=_Queueable.Queueable){this.listClass=u,this.queueableClass=t,null===e&&(e=new u(t)),this.queuedList=e}dequeue(){const e=this.remove();return e?e.complete?this.dequeue():e.running?{success:!1,error:"The queue has been blocked by an unfinished task.",context:e}:(this.empty()||this.enqueue(e),e.isReady?e.run.call(e):{success:!1,error:"Unable to find ready task.",context:e}):{success:"No more queueable tasks in the queue",error:!1,context:this.queuedList}}empty(){return this.size()<=0}enqueue(e){this.queuedList.append(e)}peek(){return this.queuedList.first}remove(){return this.empty()?null:this.queuedList.remove(this.queuedList.first)}size(){return this.queuedList.length}}exports.Queue=Queue,Queue.fromArray=(e=[],u=_Queueable.Queueable,t=_LinkedList.LinkedList)=>{const s=new t(u);return s.initialize(u.fromArray(e,u).head),new Queue(s,t,u)};
|
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file queueable item.
|
|
3
|
-
* @author Joshua Heagle <joshuaheagle@gmail.com>
|
|
4
|
-
* @version 1.1.0
|
|
5
|
-
* @memberOf module:collect-your-stuff
|
|
6
|
-
*/
|
|
7
|
-
import { completeResponse, IsRunnable } from '../../recipes/Runnable';
|
|
8
|
-
import { IsLinker } from '../../recipes/IsLinker';
|
|
9
|
-
/**
|
|
10
|
-
* Queueable represents a runnable entry in a queue.
|
|
11
|
-
* @extends Linker
|
|
12
|
-
*/
|
|
13
|
-
export declare class Queueable implements IsLinker, IsRunnable {
|
|
14
|
-
readonly classType: typeof Queueable;
|
|
15
|
-
data: any;
|
|
16
|
-
next: Queueable | null;
|
|
17
|
-
complete: boolean;
|
|
18
|
-
ready: Function | boolean;
|
|
19
|
-
running: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* Create a queueable item that can be used in a queue.
|
|
22
|
-
* @param {Object} [queueableData={}]
|
|
23
|
-
* @param {*} [queueableData.task=null] The data to be stored in this queueable
|
|
24
|
-
* @param {Queueable|null} [queueableData.next=null] The reference to the next queueable if any
|
|
25
|
-
* @param {boolean|Function} [queueableData.ready=false] Indicate if the queueable is ready to run
|
|
26
|
-
*/
|
|
27
|
-
constructor({ task, next, ready }?: {
|
|
28
|
-
task?: any;
|
|
29
|
-
next?: Queueable | null;
|
|
30
|
-
ready?: boolean;
|
|
31
|
-
});
|
|
32
|
-
/**
|
|
33
|
-
* Check ready state.
|
|
34
|
-
* @return {boolean}
|
|
35
|
-
*/
|
|
36
|
-
get isReady(): boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Retrieve the data which should be formed as a task.
|
|
39
|
-
* @return {*}
|
|
40
|
-
*/
|
|
41
|
-
get task(): any;
|
|
42
|
-
/**
|
|
43
|
-
* Set this queueable as completed.
|
|
44
|
-
* @param {Object} completeResponse
|
|
45
|
-
* @param {*} [completeResponse.success=true] Indicate when the task failed (use false) or give a success message
|
|
46
|
-
* @param {*} [completeResponse.error=false] Indicate a task was error-free (use false) or give an error message
|
|
47
|
-
* @param {*} [completeResponse.context=null] Provide additional data in the response
|
|
48
|
-
* @return {completeResponse}
|
|
49
|
-
*/
|
|
50
|
-
markCompleted({ success, error, context }?: {
|
|
51
|
-
success?: any;
|
|
52
|
-
error?: any;
|
|
53
|
-
context?: any;
|
|
54
|
-
}): completeResponse;
|
|
55
|
-
/**
|
|
56
|
-
* Intend to run the queued task when it is ready. If ready, mark this task as running and run the task.
|
|
57
|
-
* @return {completeResponse}
|
|
58
|
-
*/
|
|
59
|
-
run(): completeResponse;
|
|
60
|
-
/**
|
|
61
|
-
* Make a new Queueable from the data given if it is not already a valid Queueable.
|
|
62
|
-
* @param {Queueable|*} queueable Return a valid Queueable instance from given data, or even an already valid one.
|
|
63
|
-
* @param {IsLinker} [classType=Queueable] Provide the type of IsLinker to use.
|
|
64
|
-
* @return {Queueable}
|
|
65
|
-
*/
|
|
66
|
-
static make: (queueable: Queueable | any, classType?: any) => IsLinker;
|
|
67
|
-
/**
|
|
68
|
-
* Convert an array into Queueable instances, return the head and tail Queueables.
|
|
69
|
-
* @param {Array} values Provide an array of data that will be converted to a chain of queueable linkers.
|
|
70
|
-
* @param {IsLinker} [classType=Queueable] Provide the type of IsLinker to use.
|
|
71
|
-
* @returns {{head: Queueable, tail: Queueable}}
|
|
72
|
-
*/
|
|
73
|
-
static fromArray: (values: Array<any>, classType?: any) => {
|
|
74
|
-
head: IsLinker;
|
|
75
|
-
tail: IsLinker;
|
|
76
|
-
};
|
|
77
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @file queueable item.
|
|
3
|
+
* @author Joshua Heagle <joshuaheagle@gmail.com>
|
|
4
|
+
* @version 1.1.0
|
|
5
|
+
* @memberOf module:collect-your-stuff
|
|
6
|
+
*/
|
|
7
|
+
import { completeResponse, IsRunnable } from '../../recipes/Runnable';
|
|
8
|
+
import { IsLinker } from '../../recipes/IsLinker';
|
|
9
|
+
/**
|
|
10
|
+
* Queueable represents a runnable entry in a queue.
|
|
11
|
+
* @extends Linker
|
|
12
|
+
*/
|
|
13
|
+
export declare class Queueable implements IsLinker, IsRunnable {
|
|
14
|
+
readonly classType: typeof Queueable;
|
|
15
|
+
data: any;
|
|
16
|
+
next: Queueable | null;
|
|
17
|
+
complete: boolean;
|
|
18
|
+
ready: Function | boolean;
|
|
19
|
+
running: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Create a queueable item that can be used in a queue.
|
|
22
|
+
* @param {Object} [queueableData={}]
|
|
23
|
+
* @param {*} [queueableData.task=null] The data to be stored in this queueable
|
|
24
|
+
* @param {Queueable|null} [queueableData.next=null] The reference to the next queueable if any
|
|
25
|
+
* @param {boolean|Function} [queueableData.ready=false] Indicate if the queueable is ready to run
|
|
26
|
+
*/
|
|
27
|
+
constructor({ task, next, ready }?: {
|
|
28
|
+
task?: any;
|
|
29
|
+
next?: Queueable | null;
|
|
30
|
+
ready?: boolean;
|
|
31
|
+
});
|
|
32
|
+
/**
|
|
33
|
+
* Check ready state.
|
|
34
|
+
* @return {boolean}
|
|
35
|
+
*/
|
|
36
|
+
get isReady(): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Retrieve the data which should be formed as a task.
|
|
39
|
+
* @return {*}
|
|
40
|
+
*/
|
|
41
|
+
get task(): any;
|
|
42
|
+
/**
|
|
43
|
+
* Set this queueable as completed.
|
|
44
|
+
* @param {Object} completeResponse
|
|
45
|
+
* @param {*} [completeResponse.success=true] Indicate when the task failed (use false) or give a success message
|
|
46
|
+
* @param {*} [completeResponse.error=false] Indicate a task was error-free (use false) or give an error message
|
|
47
|
+
* @param {*} [completeResponse.context=null] Provide additional data in the response
|
|
48
|
+
* @return {completeResponse}
|
|
49
|
+
*/
|
|
50
|
+
markCompleted({ success, error, context }?: {
|
|
51
|
+
success?: any;
|
|
52
|
+
error?: any;
|
|
53
|
+
context?: any;
|
|
54
|
+
}): completeResponse;
|
|
55
|
+
/**
|
|
56
|
+
* Intend to run the queued task when it is ready. If ready, mark this task as running and run the task.
|
|
57
|
+
* @return {completeResponse}
|
|
58
|
+
*/
|
|
59
|
+
run(): completeResponse;
|
|
60
|
+
/**
|
|
61
|
+
* Make a new Queueable from the data given if it is not already a valid Queueable.
|
|
62
|
+
* @param {Queueable|*} queueable Return a valid Queueable instance from given data, or even an already valid one.
|
|
63
|
+
* @param {IsLinker} [classType=Queueable] Provide the type of IsLinker to use.
|
|
64
|
+
* @return {Queueable}
|
|
65
|
+
*/
|
|
66
|
+
static make: (queueable: Queueable | any, classType?: any) => IsLinker;
|
|
67
|
+
/**
|
|
68
|
+
* Convert an array into Queueable instances, return the head and tail Queueables.
|
|
69
|
+
* @param {Array} values Provide an array of data that will be converted to a chain of queueable linkers.
|
|
70
|
+
* @param {IsLinker} [classType=Queueable] Provide the type of IsLinker to use.
|
|
71
|
+
* @returns {{head: Queueable, tail: Queueable}}
|
|
72
|
+
*/
|
|
73
|
+
static fromArray: (values: Array<any>, classType?: any) => {
|
|
74
|
+
head: IsLinker;
|
|
75
|
+
tail: IsLinker;
|
|
76
|
+
};
|
|
77
|
+
}
|