vivth 1.1.2 → 1.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.
- package/.vivth-temp/README.src.md +35 -0
- package/README.md +1215 -433
- package/README.src.md +5 -2
- package/bun.lock +228 -0
- package/index.mjs +17 -4
- package/package.json +6 -3
- package/src/bundler/CompileJS.mjs +258 -0
- package/src/bundler/CreateESPlugin.mjs +24 -0
- package/src/bundler/EsBundler.mjs +27 -13
- package/src/bundler/FSInline.mjs +57 -0
- package/src/bundler/FSInlineAnalyzer.mjs +197 -0
- package/src/bundler/FSInlineBundled.mjs +34 -0
- package/src/bundler/adds/ToBundledJSPlugin.mjs +77 -0
- package/src/bundler/adds/externals.mjs +8 -0
- package/src/bundler/adds/pluginVivthBundle.mjs +5 -0
- package/src/class/Console.mjs +48 -27
- package/src/class/Derived.mjs +55 -7
- package/src/class/Effect.mjs +100 -39
- package/src/class/EnvSignal.mjs +5 -5
- package/src/class/EventSignal.mjs +55 -5
- package/src/class/FileSafe.mjs +124 -0
- package/src/class/ListDerived.mjs +6 -3
- package/src/class/ListSignal.mjs +11 -11
- package/src/class/LitExp.mjs +405 -0
- package/src/class/Paths.mjs +27 -1
- package/src/class/QChannel.mjs +79 -28
- package/src/class/SafeExit.mjs +31 -11
- package/src/class/Setup.mjs +5 -2
- package/src/class/Signal.mjs +26 -24
- package/src/class/WorkerMainThread.mjs +100 -133
- package/src/class/WorkerMainThreadBundled.mjs +216 -0
- package/src/class/WorkerThread.mjs +38 -32
- package/src/common/Base64URL.mjs +10 -5
- package/src/common/Base64URLFromFile.mjs +24 -0
- package/src/common/keys.mjs +3 -0
- package/src/doc/JSautoDOC.mjs +32 -56
- package/src/doc/parsedFile.mjs +37 -36
- package/src/function/CreateImmutable.mjs +9 -9
- package/src/function/EventCheck.mjs +2 -2
- package/src/function/EventObject.mjs +5 -5
- package/src/function/GetRuntime.mjs +38 -0
- package/src/function/IsAsync.mjs +2 -2
- package/src/function/LazyFactory.mjs +13 -13
- package/src/function/Timeout.mjs +2 -2
- package/src/function/Try.mjs +17 -12
- package/src/function/TryAsync.mjs +5 -5
- package/src/function/TrySync.mjs +5 -5
- package/src/function/TsToMjs.mjs +5 -4
- package/src/types/LitExpKeyType.mjs +5 -0
- package/src/types/QCBReturn.mjs +1 -1
- package/src/types/Runtime.mjs +7 -0
- package/types/dev/fsInline.d.mts +1 -0
- package/types/dev/test.d.mts +1 -0
- package/types/dev/testWorker.d.mts +7 -0
- package/types/dev/testbundle.d.mts +1 -0
- package/types/dev/workerThreadClass.d.mts +13 -0
- package/types/index.d.mts +13 -4
- package/types/src/bundler/CompileJS.d.mts +78 -0
- package/types/src/bundler/CreateESPlugin.d.mts +17 -0
- package/types/src/bundler/EsBundler.d.mts +33 -4
- package/types/src/bundler/FSInline.d.mts +43 -0
- package/types/src/bundler/FSInlineAnalyzer.d.mts +36 -0
- package/types/src/bundler/FSInlineBundled.d.mts +22 -0
- package/types/src/bundler/adds/ToBundledJSPlugin.d.mts +16 -0
- package/types/src/bundler/adds/externals.d.mts +1 -0
- package/types/src/bundler/adds/pluginVivthBundle.d.mts +1 -0
- package/types/src/class/Console.d.mts +36 -5
- package/types/src/class/Derived.d.mts +132 -5
- package/types/src/class/Effect.d.mts +106 -7
- package/types/src/class/EnvSignal.d.mts +8 -8
- package/types/src/class/EventSignal.d.mts +151 -7
- package/types/src/class/FileSafe.d.mts +90 -0
- package/types/src/class/ListDerived.d.mts +8 -5
- package/types/src/class/ListSignal.d.mts +123 -18
- package/types/src/class/LitExp.d.mts +361 -0
- package/types/src/class/Paths.d.mts +18 -1
- package/types/src/class/QChannel.d.mts +69 -22
- package/types/src/class/SafeExit.d.mts +24 -9
- package/types/src/class/Setup.d.mts +6 -5
- package/types/src/class/Signal.d.mts +73 -17
- package/types/src/class/WorkerMainThread.d.mts +39 -37
- package/types/src/class/WorkerMainThreadBundled.d.mts +85 -0
- package/types/src/class/WorkerThread.d.mts +32 -27
- package/types/src/common/Base64URL.d.mts +22 -1
- package/types/src/common/Base64URLFromFile.d.mts +16 -0
- package/types/src/common/keys.d.mts +1 -0
- package/types/src/doc/JSautoDOC.d.mts +3 -19
- package/types/src/doc/parsedFile.d.mts +72 -13
- package/types/src/function/CreateImmutable.d.mts +27 -2
- package/types/src/function/EventCheck.d.mts +15 -0
- package/types/src/function/EventObject.d.mts +17 -2
- package/types/src/function/GetRuntime.d.mts +2 -0
- package/types/src/function/IsAsync.d.mts +18 -0
- package/types/src/function/LazyFactory.d.mts +35 -2
- package/types/src/function/Timeout.d.mts +16 -0
- package/types/src/function/Try.d.mts +52 -1
- package/types/src/function/TryAsync.d.mts +22 -1
- package/types/src/function/TrySync.d.mts +16 -1
- package/types/src/function/TsToMjs.d.mts +19 -0
- package/types/src/types/LitExpKeyType.d.mts +1 -0
- package/types/src/types/QCBReturn.d.mts +1 -1
- package/types/src/types/Runtime.d.mts +1 -0
- package/dev/index.mjs +0 -28
- package/src/bundler/CompileMJS.mjs +0 -110
- package/src/function/WriteFileSafe.mjs +0 -37
- package/types/src/bundler/A.d.mts +0 -1
- package/types/src/bundler/CompileMJS.d.mts +0 -8
- package/types/src/function/WriteFileSafe.d.mts +0 -2
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description
|
|
3
|
+
* - collection of static methods of file access with added safety to mkdir before proceeding;
|
|
4
|
+
*/
|
|
5
|
+
export class FileSafe {
|
|
6
|
+
/**
|
|
7
|
+
* @description
|
|
8
|
+
* - method to create file safely by recursively mkdir the dirname of the outFile;
|
|
9
|
+
* - also returning promise of result & error as value;
|
|
10
|
+
* @param {Parameters<writeFile>[0]} outFile
|
|
11
|
+
* @param {Parameters<writeFile>[1]} content
|
|
12
|
+
* @param {Parameters<writeFile>[2]} [options]
|
|
13
|
+
* @returns {ReturnType<typeof TryAsync<void>>}
|
|
14
|
+
* @example
|
|
15
|
+
* import { join } from 'node:path';
|
|
16
|
+
* import { FileSafe, Paths } from 'vivth';
|
|
17
|
+
*
|
|
18
|
+
* const [, errorWrite] = await FileSafe.write(
|
|
19
|
+
* join(Paths.root, '/some/path.mjs'),
|
|
20
|
+
* `console.log("hello-world!!");`,
|
|
21
|
+
* { encoding: 'utf-8' }
|
|
22
|
+
* );
|
|
23
|
+
*/
|
|
24
|
+
static write: (outFile: Parameters<typeof writeFile>[0], content: Parameters<typeof writeFile>[1], options?: Parameters<typeof writeFile>[2]) => ReturnType<typeof TryAsync<void>>;
|
|
25
|
+
/**
|
|
26
|
+
* @description
|
|
27
|
+
* - method to copy file/dir safely by recursively mkdir the dirname of the dest;
|
|
28
|
+
* - also returning promise of result & error as value;
|
|
29
|
+
* @param {Parameters<typeof copyFile>[0]} sourceFile
|
|
30
|
+
* @param {Parameters<typeof copyFile>[1]} destinationFile
|
|
31
|
+
* @param {Parameters<typeof copyFile>[2]} mode
|
|
32
|
+
* @returns {ReturnType<typeof TryAsync<void>>}
|
|
33
|
+
* @example
|
|
34
|
+
* import { join } from 'node:path';
|
|
35
|
+
* import { FileSafe, Paths } from 'vivth';
|
|
36
|
+
*
|
|
37
|
+
* const [, errorWrite] = await FileSafe.copy(
|
|
38
|
+
* join(Paths.root, '/some/path.mjs'),
|
|
39
|
+
* join(Paths.root, '/other/path.copy.mjs'),
|
|
40
|
+
* { encoding: 'utf-8' }
|
|
41
|
+
* );
|
|
42
|
+
*/
|
|
43
|
+
static copy: (sourceFile: Parameters<typeof copyFile>[0], destinationFile: Parameters<typeof copyFile>[1], mode: Parameters<typeof copyFile>[2]) => ReturnType<typeof TryAsync<void>>;
|
|
44
|
+
/**
|
|
45
|
+
* @description
|
|
46
|
+
* - method to rename file/dir safely by recursively mkdir the dirname of the dest;
|
|
47
|
+
* - also returning promise of result & error as value;
|
|
48
|
+
* @param {Parameters<typeof rename>[0]} oldPath
|
|
49
|
+
* @param {Parameters<typeof rename>[0]} newPath
|
|
50
|
+
* @returns {ReturnType<typeof TryAsync<void>>}
|
|
51
|
+
* @example
|
|
52
|
+
* import { join } from 'node:path';
|
|
53
|
+
* import { FileSafe, Paths } from 'vivth';
|
|
54
|
+
*
|
|
55
|
+
* const [, errorRename] = await FileSafe.rename(
|
|
56
|
+
* join(Paths.root, 'some/path'),
|
|
57
|
+
* join(Paths.root, 'other/path'),
|
|
58
|
+
* );
|
|
59
|
+
*/
|
|
60
|
+
static rename: (oldPath: Parameters<typeof rename>[0], newPath: Parameters<typeof rename>[0]) => ReturnType<typeof TryAsync<void>>;
|
|
61
|
+
/**
|
|
62
|
+
* @description
|
|
63
|
+
* - function to remove dir and file;
|
|
64
|
+
* - also returning promise of result & error as value;
|
|
65
|
+
* @param {Parameters<rm>[0]} path
|
|
66
|
+
* @param {Parameters<rm>[1]} [rmOptions]
|
|
67
|
+
* @returns {ReturnType<typeof TryAsync<void>>}
|
|
68
|
+
*/
|
|
69
|
+
static rm: (path: Parameters<typeof rm>[0], rmOptions?: Parameters<typeof rm>[1]) => ReturnType<typeof TryAsync<void>>;
|
|
70
|
+
/**
|
|
71
|
+
* @description
|
|
72
|
+
* - create directory recursively;
|
|
73
|
+
* - also returning promise of result & error as value;
|
|
74
|
+
* @param {Parameters<mkdir>[0]} outDir
|
|
75
|
+
* - absolute path
|
|
76
|
+
* @returns {ReturnType<typeof TryAsync<string>>}
|
|
77
|
+
* @example
|
|
78
|
+
* import { join } from 'node:path';
|
|
79
|
+
* import { FileSafe, Paths } from 'vivth';
|
|
80
|
+
*
|
|
81
|
+
* const [str, errorMkDir] = await FileSafe.mkdir(join(Paths.root, '/some/path/example'));
|
|
82
|
+
*/
|
|
83
|
+
static mkdir: (outDir: Parameters<typeof mkdir>[0]) => ReturnType<typeof TryAsync<string>>;
|
|
84
|
+
}
|
|
85
|
+
import { TryAsync } from '../function/TryAsync.mjs';
|
|
86
|
+
import { writeFile } from 'node:fs/promises';
|
|
87
|
+
import { copyFile } from 'node:fs/promises';
|
|
88
|
+
import { rename } from 'node:fs/promises';
|
|
89
|
+
import { rm } from 'node:fs/promises';
|
|
90
|
+
import { mkdir } from 'node:fs/promises';
|
|
@@ -3,16 +3,19 @@
|
|
|
3
3
|
* - class to create `dervivedList` that satisfy `Array<Record<string, string>>`;
|
|
4
4
|
* - usefull for `derivedLoops`, e.g. temporary search values;
|
|
5
5
|
* - is a `Derived` instance;
|
|
6
|
-
* @template {ListArg}
|
|
7
|
-
* @extends {Derived<
|
|
6
|
+
* @template {ListArg} LISTARG
|
|
7
|
+
* @extends {Derived<LISTARG[]>}
|
|
8
8
|
*/
|
|
9
|
-
export class ListDerived<
|
|
9
|
+
export class ListDerived<LISTARG extends import("../types/ListArg.mjs").ListArg> extends Derived<LISTARG[]> {
|
|
10
10
|
/**
|
|
11
11
|
* @typedef {import('../types/ListArg.mjs').ListArg} ListArg
|
|
12
|
+
* @typedef {import('../common/lazie.mjs').unwrapLazy} unwrapLazy
|
|
12
13
|
*/
|
|
13
14
|
/**
|
|
14
15
|
* @description
|
|
15
|
-
* @param {(effectInstanceOptions:Effect["options"]
|
|
16
|
+
* @param {(effectInstanceOptions:Omit<Effect["options"],
|
|
17
|
+
* unwrapLazy>)=>
|
|
18
|
+
* Promise<LISTARG[]>} derivedFunction
|
|
16
19
|
* @example
|
|
17
20
|
* import { ListSignal, ListDerived } from 'vivth';
|
|
18
21
|
*
|
|
@@ -29,7 +32,7 @@ export class ListDerived<LA extends import("../types/ListArg.mjs").ListArg> exte
|
|
|
29
32
|
* })
|
|
30
33
|
* });
|
|
31
34
|
*/
|
|
32
|
-
constructor(derivedFunction: (effectInstanceOptions: Effect["options"]) => Promise<
|
|
35
|
+
constructor(derivedFunction: (effectInstanceOptions: Omit<Effect["options"], "vivth:unwrapLazy;">) => Promise<LISTARG[]>);
|
|
33
36
|
}
|
|
34
37
|
import { Derived } from './Derived.mjs';
|
|
35
38
|
import { Effect } from './Effect.mjs';
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @description
|
|
7
7
|
* - class to create list that satisfy `Array<Record<string, string>>`.
|
|
8
|
-
* @template {import('../types/ListArg.mjs').ListArg}
|
|
9
|
-
* @extends {Signal<
|
|
8
|
+
* @template {import('../types/ListArg.mjs').ListArg} LISTARG
|
|
9
|
+
* @extends {Signal<LISTARG[]>}
|
|
10
10
|
*/
|
|
11
|
-
export class ListSignal<
|
|
11
|
+
export class ListSignal<LISTARG extends import("../types/ListArg.mjs").ListArg> extends Signal<LISTARG[]> {
|
|
12
12
|
/**
|
|
13
13
|
* @description
|
|
14
14
|
* - Checks if the input is an array whose first item (if present) is a plain object
|
|
@@ -20,7 +20,7 @@ export class ListSignal<LA extends import("../types/ListArg.mjs").ListArg> exten
|
|
|
20
20
|
/**
|
|
21
21
|
* @description
|
|
22
22
|
* - usefull for `loops`;
|
|
23
|
-
* @param {
|
|
23
|
+
* @param {LISTARG[]} [value]
|
|
24
24
|
* @example
|
|
25
25
|
* import { ListSignal } from 'vivth';
|
|
26
26
|
*
|
|
@@ -29,7 +29,7 @@ export class ListSignal<LA extends import("../types/ListArg.mjs").ListArg> exten
|
|
|
29
29
|
* {key1: "test2",},
|
|
30
30
|
* ]);
|
|
31
31
|
*/
|
|
32
|
-
constructor(value?:
|
|
32
|
+
constructor(value?: LISTARG[]);
|
|
33
33
|
/**
|
|
34
34
|
* @description
|
|
35
35
|
* - methods collection that mimics `Array` API;
|
|
@@ -41,17 +41,17 @@ export class ListSignal<LA extends import("../types/ListArg.mjs").ListArg> exten
|
|
|
41
41
|
* @description
|
|
42
42
|
* - reference to structuredClone elements of `value`;
|
|
43
43
|
* - calling doesn't notify
|
|
44
|
-
* @
|
|
44
|
+
* @returns {Array<LISTARG>}
|
|
45
45
|
*/
|
|
46
|
-
readonly structuredClone: Array<
|
|
46
|
+
readonly structuredClone: Array<LISTARG>;
|
|
47
47
|
/**
|
|
48
48
|
* @instance arrayMethods
|
|
49
49
|
* @description
|
|
50
50
|
* - appends new elements to the end;
|
|
51
|
-
* @param {...
|
|
51
|
+
* @param {...LISTARG} listArg
|
|
52
52
|
* @returns {void}
|
|
53
53
|
*/
|
|
54
|
-
push: (...listArg:
|
|
54
|
+
push: (...listArg: LISTARG[]) => void;
|
|
55
55
|
/**
|
|
56
56
|
* @instance arrayMethods
|
|
57
57
|
* @description
|
|
@@ -63,10 +63,10 @@ export class ListSignal<LA extends import("../types/ListArg.mjs").ListArg> exten
|
|
|
63
63
|
* @instance arrayMethods
|
|
64
64
|
* @description
|
|
65
65
|
* - inserts new element at the start;
|
|
66
|
-
* @param {...
|
|
66
|
+
* @param {...LISTARG} listArg
|
|
67
67
|
* @returns {void}
|
|
68
68
|
*/
|
|
69
|
-
unshift: (...listArg:
|
|
69
|
+
unshift: (...listArg: LISTARG[]) => void;
|
|
70
70
|
/**
|
|
71
71
|
* @instance arrayMethods
|
|
72
72
|
* @description
|
|
@@ -82,11 +82,11 @@ export class ListSignal<LA extends import("../types/ListArg.mjs").ListArg> exten
|
|
|
82
82
|
* @instance arrayMethods
|
|
83
83
|
* @description
|
|
84
84
|
* - replace whole `List` data with new array.
|
|
85
|
-
* @param {
|
|
85
|
+
* @param {LISTARG[]} listArgs
|
|
86
86
|
* - new array in place of the deleted array.
|
|
87
87
|
* @returns {void}
|
|
88
88
|
*/
|
|
89
|
-
replace: (listArgs:
|
|
89
|
+
replace: (listArgs: LISTARG[]) => void;
|
|
90
90
|
/**
|
|
91
91
|
* @instance arrayMethods
|
|
92
92
|
* @description
|
|
@@ -95,11 +95,11 @@ export class ListSignal<LA extends import("../types/ListArg.mjs").ListArg> exten
|
|
|
95
95
|
* - The zero-based location in the data from which to start removing elements.
|
|
96
96
|
* @param {number} deleteCount
|
|
97
97
|
* -The number of elements to remove.
|
|
98
|
-
* @param {...
|
|
98
|
+
* @param {...LISTARG} listArg
|
|
99
99
|
* - new data in place of the deleted data.
|
|
100
100
|
* @returns {void}
|
|
101
101
|
*/
|
|
102
|
-
splice: (start: number, deleteCount: number, ...listArg:
|
|
102
|
+
splice: (start: number, deleteCount: number, ...listArg: LISTARG[]) => void;
|
|
103
103
|
/**
|
|
104
104
|
* @instance arrayMethods
|
|
105
105
|
* @description
|
|
@@ -114,10 +114,10 @@ export class ListSignal<LA extends import("../types/ListArg.mjs").ListArg> exten
|
|
|
114
114
|
* @description
|
|
115
115
|
* - modify `List` element at specific index;
|
|
116
116
|
* @param {number} index
|
|
117
|
-
* @param {Partial<
|
|
117
|
+
* @param {Partial<LISTARG>} listArg
|
|
118
118
|
* @returns {void}
|
|
119
119
|
*/
|
|
120
|
-
modify: (index: number, listArg: Partial<
|
|
120
|
+
modify: (index: number, listArg: Partial<LISTARG>) => void;
|
|
121
121
|
/**
|
|
122
122
|
* @instance arrayMethods
|
|
123
123
|
* @description
|
|
@@ -141,7 +141,112 @@ export class ListSignal<LA extends import("../types/ListArg.mjs").ListArg> exten
|
|
|
141
141
|
*/
|
|
142
142
|
pop: () => void;
|
|
143
143
|
} & {
|
|
144
|
-
"vivth:unwrapLazy;":
|
|
144
|
+
"vivth:unwrapLazy;": () => {
|
|
145
|
+
/**
|
|
146
|
+
* @instance arrayMethods
|
|
147
|
+
* @description
|
|
148
|
+
* - reference to structuredClone elements of `value`;
|
|
149
|
+
* - calling doesn't notify
|
|
150
|
+
* @returns {Array<LISTARG>}
|
|
151
|
+
*/
|
|
152
|
+
readonly structuredClone: Array<LISTARG>;
|
|
153
|
+
/**
|
|
154
|
+
* @instance arrayMethods
|
|
155
|
+
* @description
|
|
156
|
+
* - appends new elements to the end;
|
|
157
|
+
* @param {...LISTARG} listArg
|
|
158
|
+
* @returns {void}
|
|
159
|
+
*/
|
|
160
|
+
push: (...listArg: LISTARG[]) => void;
|
|
161
|
+
/**
|
|
162
|
+
* @instance arrayMethods
|
|
163
|
+
* @description
|
|
164
|
+
* - removes the first element;
|
|
165
|
+
* @type {()=>void}
|
|
166
|
+
*/
|
|
167
|
+
shift: () => void;
|
|
168
|
+
/**
|
|
169
|
+
* @instance arrayMethods
|
|
170
|
+
* @description
|
|
171
|
+
* - inserts new element at the start;
|
|
172
|
+
* @param {...LISTARG} listArg
|
|
173
|
+
* @returns {void}
|
|
174
|
+
*/
|
|
175
|
+
unshift: (...listArg: LISTARG[]) => void;
|
|
176
|
+
/**
|
|
177
|
+
* @instance arrayMethods
|
|
178
|
+
* @description
|
|
179
|
+
* - for both start and end, a negative index can be used to indicate an offset from the end of the data. For example, -2 refers to the second to last element of the data;
|
|
180
|
+
* @param {number} [start]
|
|
181
|
+
* - the beginning index of the specified portion of the data. If start is undefined, then the slice begins at index 0.
|
|
182
|
+
* @param {number} [end]
|
|
183
|
+
* - the end index of the specified portion of the data. This is exclusive of the element at the index 'end'. If end is undefined, then the slice extends to the end of the data.
|
|
184
|
+
* @returns {void}
|
|
185
|
+
*/
|
|
186
|
+
slice: (start?: number, end?: number) => void;
|
|
187
|
+
/**
|
|
188
|
+
* @instance arrayMethods
|
|
189
|
+
* @description
|
|
190
|
+
* - replace whole `List` data with new array.
|
|
191
|
+
* @param {LISTARG[]} listArgs
|
|
192
|
+
* - new array in place of the deleted array.
|
|
193
|
+
* @returns {void}
|
|
194
|
+
*/
|
|
195
|
+
replace: (listArgs: LISTARG[]) => void;
|
|
196
|
+
/**
|
|
197
|
+
* @instance arrayMethods
|
|
198
|
+
* @description
|
|
199
|
+
* - removes elements from an data and, if necessary, inserts new elements in their place;
|
|
200
|
+
* @param {number} start
|
|
201
|
+
* - The zero-based location in the data from which to start removing elements.
|
|
202
|
+
* @param {number} deleteCount
|
|
203
|
+
* -The number of elements to remove.
|
|
204
|
+
* @param {...LISTARG} listArg
|
|
205
|
+
* - new data in place of the deleted data.
|
|
206
|
+
* @returns {void}
|
|
207
|
+
*/
|
|
208
|
+
splice: (start: number, deleteCount: number, ...listArg: LISTARG[]) => void;
|
|
209
|
+
/**
|
|
210
|
+
* @instance arrayMethods
|
|
211
|
+
* @description
|
|
212
|
+
* - swap `List` data between two indexes;
|
|
213
|
+
* @param {number} indexA
|
|
214
|
+
* @param {number} indexB
|
|
215
|
+
* @returns {void}
|
|
216
|
+
*/
|
|
217
|
+
swap: (indexA: number, indexB: number) => void;
|
|
218
|
+
/**
|
|
219
|
+
* @instance arrayMethods
|
|
220
|
+
* @description
|
|
221
|
+
* - modify `List` element at specific index;
|
|
222
|
+
* @param {number} index
|
|
223
|
+
* @param {Partial<LISTARG>} listArg
|
|
224
|
+
* @returns {void}
|
|
225
|
+
*/
|
|
226
|
+
modify: (index: number, listArg: Partial<LISTARG>) => void;
|
|
227
|
+
/**
|
|
228
|
+
* @instance arrayMethods
|
|
229
|
+
* @description
|
|
230
|
+
* - remove `List` element at specific index;
|
|
231
|
+
* @param {number} index
|
|
232
|
+
* @returns {void}
|
|
233
|
+
*/
|
|
234
|
+
remove: (index: number) => void;
|
|
235
|
+
/**
|
|
236
|
+
* @instance arrayMethods
|
|
237
|
+
* @description
|
|
238
|
+
* - reverses the elements in an `List` in place.
|
|
239
|
+
* @returns {void}
|
|
240
|
+
*/
|
|
241
|
+
reverse: () => void;
|
|
242
|
+
/**
|
|
243
|
+
* @instance arrayMethods
|
|
244
|
+
* @description
|
|
245
|
+
* - removes the last element;
|
|
246
|
+
* @returns {void}
|
|
247
|
+
*/
|
|
248
|
+
pop: () => void;
|
|
249
|
+
};
|
|
145
250
|
};
|
|
146
251
|
#private;
|
|
147
252
|
}
|