clientnode 3.0.834 → 3.0.838
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/index.d.ts +201 -213
- package/index.js +1 -1
- package/package.json +1 -1
- package/property-types.d.ts +12 -1
- package/property-types.js +1 -1
- package/testHelper.d.ts +17 -19
- package/testHelper.js +1 -1
- package/type.d.ts +44 -42
package/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { ChildProcess } from 'child_process';
|
|
3
|
-
import { AnyFunction, CheckReachabilityOptions, CompareOptions, CompilationResult, EvaluationResult, File, FirstParameter, GetterFunction, LockCallbackFunction, Mapping, ObjectMaskConfiguration, Options, Page, PaginateOptions, ParametersExceptFirst, PlainObject, ProcessCloseCallback, ProcessErrorCallback, ProcessHandler, ProxyHandler, ProxyType, QueryParameters, RecursiveEvaluateable, RecursivePartial, RelativePosition, SecondParameter, Selector, SetterFunction, TimeoutPromise, $DomNode, $DomNodes, $
|
|
3
|
+
import { AnyFunction, CheckReachabilityOptions, CompareOptions, CompilationResult, Encoding, EvaluationResult, File, FirstParameter, GetterFunction, ImportFunction, LockCallbackFunction, Mapping, ObjectMaskConfiguration, Options, Page, PaginateOptions, ParametersExceptFirst, PlainObject, ProcessCloseCallback, ProcessErrorCallback, ProcessHandler, ProxyHandler, ProxyType, QueryParameters, RecursiveEvaluateable, RecursivePartial, RelativePosition, SecondParameter, Selector, SetterFunction, TimeoutPromise, $DomNode, $DomNodes, $Global, $TStatic } from './type';
|
|
4
4
|
export declare const CloseEventNames: readonly ["close", "exit", "SIGINT", "SIGTERM", "SIGQUIT", "uncaughtException"];
|
|
5
5
|
export declare const ConsoleOutputMethods: readonly ["debug", "error", "info", "log", "warn"];
|
|
6
6
|
export declare const ValueCopySymbol: unique symbol;
|
|
@@ -8,12 +8,11 @@ export declare const IgnoreNullAndUndefinedSymbol: unique symbol;
|
|
|
8
8
|
export declare const determineGlobalContext: (() => $Global);
|
|
9
9
|
export declare let globalContext: $Global;
|
|
10
10
|
export declare const setGlobalContext: (context: $Global) => void;
|
|
11
|
-
export declare const currentRequire:
|
|
12
|
-
export declare const currentImport:
|
|
11
|
+
export declare const currentRequire: null | typeof require;
|
|
12
|
+
export declare const currentImport: null | ImportFunction;
|
|
13
13
|
export declare const optionalRequire: typeof require;
|
|
14
|
-
declare const
|
|
15
|
-
export declare
|
|
16
|
-
export declare let $: $Function;
|
|
14
|
+
export declare const determine$: (() => $TStatic);
|
|
15
|
+
export declare let $: $TStatic;
|
|
17
16
|
/**
|
|
18
17
|
* Represents the semaphore state.
|
|
19
18
|
* @property queue - List of waiting resource requests.
|
|
@@ -22,7 +21,7 @@ export declare let $: $Function;
|
|
|
22
21
|
* @property numberOfResources - Number of allowed concurrent resource uses.
|
|
23
22
|
*/
|
|
24
23
|
export declare class Semaphore {
|
|
25
|
-
queue: Array<
|
|
24
|
+
queue: Array<AnyFunction>;
|
|
26
25
|
numberOfResources: number;
|
|
27
26
|
numberOfFreeResources: number;
|
|
28
27
|
/**
|
|
@@ -103,7 +102,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
103
102
|
static noop: AnyFunction;
|
|
104
103
|
static plainObjectPrototypes: Array<FirstParameter<typeof Object.getPrototypeOf>>;
|
|
105
104
|
static readonly specialRegexSequences: Array<string>;
|
|
106
|
-
static readonly transitionEndEventNames
|
|
105
|
+
static readonly transitionEndEventNames = "transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd";
|
|
107
106
|
static _dateTimePatternCache: Array<RegExp>;
|
|
108
107
|
static _defaultOptions: Partial<Options>;
|
|
109
108
|
static _javaScriptDependentContentHandled: boolean;
|
|
@@ -117,7 +116,6 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
117
116
|
* replaced with this plugin name suffix ("tools"). You don't have to use
|
|
118
117
|
* "{1}" but it can help you to write code which is more reconcilable with
|
|
119
118
|
* the dry concept.
|
|
120
|
-
*
|
|
121
119
|
* @param $domNode - $-extended dom node to use as reference in various
|
|
122
120
|
* methods.
|
|
123
121
|
* @param locks - Mapping of a lock description to callbacks for calling
|
|
@@ -128,6 +126,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
128
126
|
constructor($domNode?: $DomNode<TElement>, locks?: Mapping<Array<LockCallbackFunction<LockType>>>);
|
|
129
127
|
/**
|
|
130
128
|
* This method could be overwritten normally. It acts like a destructor.
|
|
129
|
+
*
|
|
131
130
|
* @returns Returns the current instance.
|
|
132
131
|
*/
|
|
133
132
|
destructor(): Tools<TElement, LockType>;
|
|
@@ -135,13 +134,24 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
135
134
|
* This method should be overwritten normally. It is triggered if current
|
|
136
135
|
* object was created via the "new" keyword and is called now.
|
|
137
136
|
* @param options - An options object.
|
|
137
|
+
*
|
|
138
138
|
* @returns Returns the current instance.
|
|
139
139
|
*/
|
|
140
140
|
initialize(options?: RecursivePartial<Options>): Promise<$DomNode<TElement>> | Promise<Tools> | Tools<TElement, LockType> | Tools;
|
|
141
|
-
static dateTimeFormat(format?: string, dateTime?: Date, options?: SecondParameter<typeof Intl.DateTimeFormat>, locales?: Array<string> | string): string;
|
|
142
141
|
/**
|
|
143
|
-
*
|
|
142
|
+
* Formats given date or current via given format specification.
|
|
143
|
+
* @param format - Format specification.
|
|
144
|
+
* @param dateTime - Date time to format.
|
|
145
|
+
* @param options - Additional configuration options for
|
|
146
|
+
* "Intl.DateTimeFormat".
|
|
147
|
+
* @param locales - Locale or list of locales to use for formatting. First
|
|
148
|
+
* one take precedence of latter ones.
|
|
144
149
|
*
|
|
150
|
+
* @returns Formatted date time string.
|
|
151
|
+
*/
|
|
152
|
+
static dateTimeFormat(this: void, format?: string, dateTime?: Date, options?: SecondParameter<typeof Intl.DateTimeFormat>, locales?: Array<string> | string): string;
|
|
153
|
+
/**
|
|
154
|
+
* Defines a generic controller for dom node aware plugins.
|
|
145
155
|
* @param object - The object or class to control. If "object" is a class
|
|
146
156
|
* an instance will be generated.
|
|
147
157
|
* @param parameters - The initially given arguments object.
|
|
@@ -149,12 +159,11 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
149
159
|
*
|
|
150
160
|
* @returns Returns whatever the initializer method returns.
|
|
151
161
|
*/
|
|
152
|
-
static controller<TElement = HTMLElement, RT = ReturnType<Tools['initialize']>>(object: unknown, parameters: unknown, $domNode?: null | $DomNode<TElement>): RT | void;
|
|
162
|
+
static controller<TElement = HTMLElement, RT = ReturnType<Tools['initialize']>>(this: void, object: unknown, parameters: unknown, $domNode?: null | $DomNode<TElement>): RT | void;
|
|
153
163
|
/**
|
|
154
164
|
* Calling this method introduces a starting point for a critical area with
|
|
155
165
|
* potential race conditions. The area will be binded to given description
|
|
156
166
|
* string. So don't use same names for different areas.
|
|
157
|
-
*
|
|
158
167
|
* @param description - A short string describing the critical areas
|
|
159
168
|
* properties.
|
|
160
169
|
* @param callback - A procedure which should only be executed if the
|
|
@@ -168,7 +177,6 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
168
177
|
/**
|
|
169
178
|
* Calling this method causes the given critical area to be finished and
|
|
170
179
|
* all functions given to "acquireLock()" will be executed in right order.
|
|
171
|
-
*
|
|
172
180
|
* @param description - A short string describing the critical areas
|
|
173
181
|
* properties.
|
|
174
182
|
*
|
|
@@ -179,82 +187,90 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
179
187
|
/**
|
|
180
188
|
* Generate a semaphore object with given number of resources.
|
|
181
189
|
* @param numberOfResources - Number of allowed concurrent resource uses.
|
|
190
|
+
*
|
|
182
191
|
* @returns The requested semaphore instance.
|
|
183
192
|
*/
|
|
184
|
-
static getSemaphore(numberOfResources?: number): Semaphore;
|
|
193
|
+
static getSemaphore(this: void, numberOfResources?: number): Semaphore;
|
|
185
194
|
/**
|
|
186
195
|
* Determines whether its argument represents a JavaScript number.
|
|
187
196
|
* @param value - Value to analyze.
|
|
197
|
+
*
|
|
188
198
|
* @returns A boolean value indicating whether given object is numeric
|
|
189
199
|
* like.
|
|
190
200
|
*/
|
|
191
|
-
static isNumeric(value: unknown): value is number;
|
|
201
|
+
static isNumeric(this: void, value: unknown): value is number;
|
|
192
202
|
/**
|
|
193
203
|
* Determine whether the argument is a window.
|
|
194
204
|
* @param value - Value to check for.
|
|
205
|
+
*
|
|
195
206
|
* @returns Boolean value indicating the result.
|
|
196
207
|
*/
|
|
197
|
-
static isWindow(value: unknown): value is Window;
|
|
208
|
+
static isWindow(this: void, value: unknown): value is Window;
|
|
198
209
|
/**
|
|
199
210
|
* Checks if given object is similar to an array and can be handled like an
|
|
200
211
|
* array.
|
|
201
212
|
* @param object - Object to check behavior for.
|
|
213
|
+
*
|
|
202
214
|
* @returns A boolean value indicating whether given object is array like.
|
|
203
215
|
*/
|
|
204
|
-
static isArrayLike(object: unknown): boolean;
|
|
216
|
+
static isArrayLike(this: void, object: unknown): boolean;
|
|
205
217
|
/**
|
|
206
218
|
* Checks whether one of the given pattern matches given string.
|
|
207
|
-
*
|
|
208
219
|
* @param target - Target to check in pattern for.
|
|
209
220
|
* @param pattern - List of pattern to check for.
|
|
210
|
-
* @returns Value "true" if given object is matches by at leas one of the
|
|
211
221
|
*
|
|
222
|
+
* @returns Value "true" if given object is matches by at leas one of the
|
|
212
223
|
* given pattern and "false" otherwise.
|
|
213
224
|
*/
|
|
214
|
-
static isAnyMatching(target: string, pattern: Array<string | RegExp>): boolean;
|
|
225
|
+
static isAnyMatching(this: void, target: string, pattern: Array<string | RegExp>): boolean;
|
|
215
226
|
/**
|
|
216
227
|
* Checks whether given object is a native object but not null.
|
|
217
228
|
* @param value - Value to check.
|
|
229
|
+
*
|
|
218
230
|
* @returns Value "true" if given object is a plain javaScript object and
|
|
219
231
|
* "false" otherwise.
|
|
220
232
|
*/
|
|
221
|
-
static isObject(value: unknown): value is object;
|
|
233
|
+
static isObject(this: void, value: unknown): value is object;
|
|
222
234
|
/**
|
|
223
235
|
* Checks whether given object is a plain native object.
|
|
224
236
|
* @param value - Value to check.
|
|
237
|
+
*
|
|
225
238
|
* @returns Value "true" if given object is a plain javaScript object and
|
|
226
239
|
* "false" otherwise.
|
|
227
240
|
*/
|
|
228
|
-
static isPlainObject(value: unknown): value is PlainObject;
|
|
241
|
+
static isPlainObject(this: void, value: unknown): value is PlainObject;
|
|
229
242
|
/**
|
|
230
243
|
* Checks whether given object is a set.
|
|
231
244
|
* @param value - Value to check.
|
|
245
|
+
*
|
|
232
246
|
* @returns Value "true" if given object is a set and "false" otherwise.
|
|
233
247
|
*/
|
|
234
|
-
static isSet(value: unknown): value is Set<unknown>;
|
|
248
|
+
static isSet(this: void, value: unknown): value is Set<unknown>;
|
|
235
249
|
/**
|
|
236
250
|
* Checks whether given object is a map.
|
|
237
251
|
* @param value - Value to check.
|
|
252
|
+
*
|
|
238
253
|
* @returns Value "true" if given object is a map and "false" otherwise.
|
|
239
254
|
*/
|
|
240
|
-
static isMap(value: unknown): value is Map<unknown, unknown>;
|
|
255
|
+
static isMap(this: void, value: unknown): value is Map<unknown, unknown>;
|
|
241
256
|
/**
|
|
242
257
|
* Checks whether given object is a proxy.
|
|
243
258
|
* @param value - Value to check.
|
|
259
|
+
*
|
|
244
260
|
* @returns Value "true" if given object is a proxy and "false" otherwise.
|
|
245
261
|
*/
|
|
246
|
-
static isProxy(value: unknown): value is ProxyType;
|
|
262
|
+
static isProxy(this: void, value: unknown): value is ProxyType;
|
|
247
263
|
/**
|
|
248
264
|
* Checks whether given object is a function.
|
|
249
265
|
* @param value - Value to check.
|
|
266
|
+
*
|
|
250
267
|
* @returns Value "true" if given object is a function and "false"
|
|
251
268
|
* otherwise.
|
|
252
269
|
*/
|
|
253
|
-
static isFunction(value: unknown): value is
|
|
270
|
+
static isFunction(this: void, value: unknown): value is AnyFunction;
|
|
254
271
|
/**
|
|
255
272
|
* Shows the given object's representation in the browsers console if
|
|
256
273
|
* possible or in a standalone alert-window as fallback.
|
|
257
|
-
*
|
|
258
274
|
* @param object - Any object to print.
|
|
259
275
|
* @param force - If set to "true" given input will be shown independently
|
|
260
276
|
* from current logging configuration or interpreter's console
|
|
@@ -271,7 +287,6 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
271
287
|
/**
|
|
272
288
|
* Wrapper method for the native console method usually provided by
|
|
273
289
|
* interpreter.
|
|
274
|
-
*
|
|
275
290
|
* @param object - Any object to print.
|
|
276
291
|
* @param additionalArguments - Additional arguments are used for string
|
|
277
292
|
* formatting.
|
|
@@ -282,7 +297,6 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
282
297
|
/**
|
|
283
298
|
* Wrapper method for the native console method usually provided by
|
|
284
299
|
* interpreter.
|
|
285
|
-
*
|
|
286
300
|
* @param object - Any object to print.
|
|
287
301
|
* @param additionalArguments - Additional arguments are used for string
|
|
288
302
|
* formatting.
|
|
@@ -293,7 +307,6 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
293
307
|
/**
|
|
294
308
|
* Wrapper method for the native console method usually provided by
|
|
295
309
|
* interpreter.
|
|
296
|
-
*
|
|
297
310
|
* @param object - Any object to print.
|
|
298
311
|
* @param additionalArguments - Additional arguments are used for string
|
|
299
312
|
* formatting.
|
|
@@ -304,7 +317,6 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
304
317
|
/**
|
|
305
318
|
* Wrapper method for the native console method usually provided by
|
|
306
319
|
* interpreter.
|
|
307
|
-
*
|
|
308
320
|
* @param object - Any object to print.
|
|
309
321
|
* @param additionalArguments - Additional arguments are used for string
|
|
310
322
|
* formatting.
|
|
@@ -315,7 +327,6 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
315
327
|
/**
|
|
316
328
|
* Wrapper method for the native console method usually provided by
|
|
317
329
|
* interpreter.
|
|
318
|
-
*
|
|
319
330
|
* @param object - Any object to print.
|
|
320
331
|
* @param additionalArguments - Additional arguments are used for string
|
|
321
332
|
* formatting.
|
|
@@ -325,7 +336,6 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
325
336
|
warn(object: unknown, ...additionalArguments: Array<unknown>): void;
|
|
326
337
|
/**
|
|
327
338
|
* Dumps a given object in a human readable format.
|
|
328
|
-
*
|
|
329
339
|
* @param object - Any object to show.
|
|
330
340
|
* @param level - Number of levels to dig into given object recursively.
|
|
331
341
|
* @param currentLevel - Maximal number of recursive function calls to
|
|
@@ -333,19 +343,21 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
333
343
|
*
|
|
334
344
|
* @returns Returns the serialized version of given object.
|
|
335
345
|
*/
|
|
336
|
-
static show(object: unknown, level?: number, currentLevel?: number): string;
|
|
346
|
+
static show(this: void, object: unknown, level?: number, currentLevel?: number): string;
|
|
337
347
|
/**
|
|
338
348
|
* Deletes a cookie value by given name.
|
|
339
349
|
* @param name - Name to identify requested value.
|
|
350
|
+
*
|
|
340
351
|
* @returns Nothing.
|
|
341
352
|
*/
|
|
342
|
-
static deleteCookie(name: string): void;
|
|
353
|
+
static deleteCookie(this: void, name: string): void;
|
|
343
354
|
/**
|
|
344
355
|
* Gets a cookie value by given name.
|
|
345
356
|
* @param name - Name to identify requested value.
|
|
357
|
+
*
|
|
346
358
|
* @returns Requested value.
|
|
347
359
|
*/
|
|
348
|
-
static getCookie(name: string): string | null;
|
|
360
|
+
static getCookie(this: void, name: string): string | null;
|
|
349
361
|
/**
|
|
350
362
|
* Sets a cookie key-value-pair.
|
|
351
363
|
* @param name - Name to identify given value.
|
|
@@ -359,11 +371,13 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
359
371
|
* connections.
|
|
360
372
|
* @param httpOnly - Indicates if this cookie should be accessible from
|
|
361
373
|
* client or not.
|
|
374
|
+
*
|
|
362
375
|
* @returns A boolean indicating whether cookie could be set or not.
|
|
363
376
|
*/
|
|
364
|
-
static setCookie(name: string, value: string, domain?: string, sameSite?: 'Lax' | 'None' | 'Strict' | '', numberOfDaysUntilExpiration?: number, path?: string, secure?: boolean, httpOnly?: boolean): boolean;
|
|
377
|
+
static setCookie(this: void, name: string, value: string, domain?: string, sameSite?: 'Lax' | 'None' | 'Strict' | '', numberOfDaysUntilExpiration?: number, path?: string, secure?: boolean, httpOnly?: boolean): boolean;
|
|
365
378
|
/**
|
|
366
379
|
* Normalizes class name order of current dom node.
|
|
380
|
+
*
|
|
367
381
|
* @returns Current instance.
|
|
368
382
|
*/
|
|
369
383
|
get normalizedClassNames(): Tools<TElement, LockType>;
|
|
@@ -385,7 +399,6 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
385
399
|
get text(): string;
|
|
386
400
|
/**
|
|
387
401
|
* Checks whether given html or text strings are equal.
|
|
388
|
-
*
|
|
389
402
|
* @param first - First html, selector to dom node or text to compare.
|
|
390
403
|
* @param second - Second html, selector to dom node or text to compare.
|
|
391
404
|
* @param forceHTMLString - Indicates whether given contents are
|
|
@@ -394,11 +407,10 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
394
407
|
*
|
|
395
408
|
* @returns Returns true if both dom representations are equivalent.
|
|
396
409
|
*/
|
|
397
|
-
static isEquivalentDOM(first: Node | string | $DomNode
|
|
410
|
+
static isEquivalentDOM(this: void, first: Node | string | $DomNode<Node>, second: Node | string | $DomNode<Node>, forceHTMLString?: boolean): boolean;
|
|
398
411
|
/**
|
|
399
412
|
* Determines where current dom node is relative to current view port
|
|
400
413
|
* position.
|
|
401
|
-
*
|
|
402
414
|
* @param givenDelta - Allows deltas for "top", "left", "bottom" and
|
|
403
415
|
* "right" for determining positions.
|
|
404
416
|
*
|
|
@@ -413,9 +425,10 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
413
425
|
/**
|
|
414
426
|
* Generates a directive name corresponding selector string.
|
|
415
427
|
* @param directiveName - The directive name.
|
|
428
|
+
*
|
|
416
429
|
* @returns Returns generated selector.
|
|
417
430
|
*/
|
|
418
|
-
static generateDirectiveSelector(directiveName: string): string;
|
|
431
|
+
static generateDirectiveSelector(this: void, directiveName: string): string;
|
|
419
432
|
/**
|
|
420
433
|
* Removes a directive name corresponding class or attribute.
|
|
421
434
|
* @param directiveName - The directive name.
|
|
@@ -431,12 +444,14 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
431
444
|
/**
|
|
432
445
|
* Determines a normalized camel case directive name representation.
|
|
433
446
|
* @param directiveName - The directive name.
|
|
447
|
+
*
|
|
434
448
|
* @returns Returns the corresponding name.
|
|
435
449
|
*/
|
|
436
|
-
static getNormalizedDirectiveName(directiveName: string): string;
|
|
450
|
+
static getNormalizedDirectiveName(this: void, directiveName: string): string;
|
|
437
451
|
/**
|
|
438
452
|
* Determines a directive attribute value.
|
|
439
453
|
* @param directiveName - The directive name.
|
|
454
|
+
*
|
|
440
455
|
* @returns Returns the corresponding attribute value or "null" if no
|
|
441
456
|
* attribute value exists.
|
|
442
457
|
*/
|
|
@@ -452,6 +467,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
452
467
|
* Determines the dom node name of a given dom node string.
|
|
453
468
|
* @param domNodeSelector - A given to dom node selector to determine its
|
|
454
469
|
* name.
|
|
470
|
+
*
|
|
455
471
|
* @returns Returns The dom node name.
|
|
456
472
|
* @example
|
|
457
473
|
* // returns 'div'
|
|
@@ -463,12 +479,11 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
463
479
|
* // returns 'br'
|
|
464
480
|
* $.Tools.getDomNodeName('<br/>')
|
|
465
481
|
*/
|
|
466
|
-
static getDomNodeName(domNodeSelector: string): null | string;
|
|
482
|
+
static getDomNodeName(this: void, domNodeSelector: string): null | string;
|
|
467
483
|
/**
|
|
468
484
|
* Converts an object of dom selectors to an array of $ wrapped dom nodes.
|
|
469
485
|
* Note if selector description as one of "class" or "id" as suffix element
|
|
470
486
|
* will be ignored.
|
|
471
|
-
*
|
|
472
487
|
* @param domNodeSelectors - An object with dom node selectors.
|
|
473
488
|
* @param wrapperDomNode - A dom node to be the parent or wrapper of all
|
|
474
489
|
* retrieved dom nodes.
|
|
@@ -476,18 +491,18 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
476
491
|
* @returns Returns All $ wrapped dom nodes corresponding to given
|
|
477
492
|
* selectors.
|
|
478
493
|
*/
|
|
479
|
-
|
|
494
|
+
grabDomNodes(domNodeSelectors: Mapping, wrapperDomNode?: Node | null | string | $DomNode<Node>): $DomNodes;
|
|
480
495
|
/**
|
|
481
496
|
* Overwrites all inherited variables from parent scope with "undefined".
|
|
482
497
|
* @param scope - A scope where inherited names will be removed.
|
|
483
498
|
* @param prefixesToIgnore - Name prefixes to ignore during deleting names
|
|
484
499
|
* in given scope.
|
|
500
|
+
*
|
|
485
501
|
* @returns The isolated scope.
|
|
486
502
|
*/
|
|
487
|
-
static isolateScope<T extends Object>(scope: T, prefixesToIgnore?: Array<string>): T;
|
|
503
|
+
static isolateScope<T extends Object>(this: void, scope: T, prefixesToIgnore?: Array<string>): T;
|
|
488
504
|
/**
|
|
489
505
|
* Generates a unique name in given scope (useful for jsonp requests).
|
|
490
|
-
*
|
|
491
506
|
* @param prefix - A prefix which will be prepended to unique name.
|
|
492
507
|
* @param suffix - A suffix which will be prepended to unique name.
|
|
493
508
|
* @param scope - A scope where the name should be unique.
|
|
@@ -495,31 +510,33 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
495
510
|
*
|
|
496
511
|
* @returns The function name.
|
|
497
512
|
*/
|
|
498
|
-
static determineUniqueScopeName(prefix?: string, suffix?: string, scope?: object, initialUniqueName?: string): string;
|
|
513
|
+
static determineUniqueScopeName(this: void, prefix?: string, suffix?: string, scope?: object, initialUniqueName?: string): string;
|
|
499
514
|
/**
|
|
500
515
|
* Determines all parameter names from given callable (function or class,
|
|
501
516
|
* ...).
|
|
502
517
|
* @param callable - Function or function code to inspect.
|
|
518
|
+
*
|
|
503
519
|
* @returns List of parameter names.
|
|
504
520
|
*/
|
|
505
|
-
static getParameterNames(callable:
|
|
521
|
+
static getParameterNames(this: void, callable: AnyFunction | string): Array<string>;
|
|
506
522
|
/**
|
|
507
523
|
* Implements the identity function.
|
|
508
524
|
* @param value - A value to return.
|
|
525
|
+
*
|
|
509
526
|
* @returns Returns the given value.
|
|
510
527
|
*/
|
|
511
|
-
static identity<T>(value: T): T;
|
|
528
|
+
static identity<T>(this: void, value: T): T;
|
|
512
529
|
/**
|
|
513
530
|
* Inverted filter helper to inverse each given filter.
|
|
514
531
|
* @param filter - A function that filters an array.
|
|
532
|
+
*
|
|
515
533
|
* @returns The inverted filter.
|
|
516
534
|
*/
|
|
517
|
-
static invertArrayFilter<T extends AnyFunction = (data: Array<unknown>, ...additionalParameter: Array<unknown>) => Array<unknown>>(filter: T): T;
|
|
535
|
+
static invertArrayFilter<T extends AnyFunction = (this: void, data: Array<unknown>, ...additionalParameter: Array<unknown>) => Array<unknown>>(filter: T): T;
|
|
518
536
|
/**
|
|
519
537
|
* Triggers given callback after given duration. Supports unlimited
|
|
520
538
|
* duration length and returns a promise which will be resolved after given
|
|
521
539
|
* duration has been passed.
|
|
522
|
-
*
|
|
523
540
|
* @param parameters - Observes the first three existing parameters. If one
|
|
524
541
|
* is a number it will be interpret as delay in milliseconds until given
|
|
525
542
|
* callback will be triggered. If one is of type function it will be used
|
|
@@ -533,12 +550,11 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
533
550
|
* holds a boolean indicating whether timeout has been canceled or
|
|
534
551
|
* resolved.
|
|
535
552
|
*/
|
|
536
|
-
static timeout(...parameters: Array<unknown>): TimeoutPromise;
|
|
553
|
+
static timeout(this: void, ...parameters: Array<unknown>): TimeoutPromise;
|
|
537
554
|
/**
|
|
538
555
|
* Prevents event functions from triggering to often by defining a minimal
|
|
539
556
|
* span between each function call. Additional arguments given to this
|
|
540
557
|
* function will be forwarded to given event function call.
|
|
541
|
-
*
|
|
542
558
|
* @param callback - The function to call debounced.
|
|
543
559
|
* @param thresholdInMilliseconds - The minimum time span between each
|
|
544
560
|
* function call.
|
|
@@ -547,13 +563,12 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
547
563
|
*
|
|
548
564
|
* @returns Returns the wrapped method.
|
|
549
565
|
*/
|
|
550
|
-
static debounce<T = unknown>(callback:
|
|
566
|
+
static debounce<T = unknown>(this: void, callback: AnyFunction, thresholdInMilliseconds?: number, ...additionalArguments: Array<unknown>): ((...parameters: Array<unknown>) => Promise<T>);
|
|
551
567
|
/**
|
|
552
568
|
* Searches for internal event handler methods and runs them by default. In
|
|
553
569
|
* addition this method searches for a given event method by the options
|
|
554
570
|
* object. Additional arguments are forwarded to respective event
|
|
555
571
|
* functions.
|
|
556
|
-
*
|
|
557
572
|
* @param eventName - An event name.
|
|
558
573
|
* @param callOnlyOptionsMethod - Prevents from trying to call an internal
|
|
559
574
|
* event handler.
|
|
@@ -570,7 +585,6 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
570
585
|
* A wrapper method for "$.on()". It sets current plugin name as event
|
|
571
586
|
* scope if no scope is given. Given arguments are modified and passed
|
|
572
587
|
* through "$.on()".
|
|
573
|
-
*
|
|
574
588
|
* @param parameters - Parameter to forward.
|
|
575
589
|
*
|
|
576
590
|
* @returns Returns $'s grabbed dom node.
|
|
@@ -580,7 +594,6 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
580
594
|
* A wrapper method fo "$.off()". It sets current plugin name as event
|
|
581
595
|
* scope if no scope is given. Given arguments are modified and passed
|
|
582
596
|
* through "$.off()".
|
|
583
|
-
*
|
|
584
597
|
* @param parameters - Parameter to forward.
|
|
585
598
|
*
|
|
586
599
|
* @returns Returns $'s grabbed dom node.
|
|
@@ -588,7 +601,6 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
588
601
|
off<TElement = HTMLElement>(...parameters: Array<unknown>): $DomNode<TElement>;
|
|
589
602
|
/**
|
|
590
603
|
* Adds dynamic getter and setter to any given data structure such as maps.
|
|
591
|
-
*
|
|
592
604
|
* @param object - Object to proxy.
|
|
593
605
|
* @param getterWrapper - Function to wrap each property get.
|
|
594
606
|
* @param setterWrapper - Function to wrap each property set.
|
|
@@ -600,7 +612,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
600
612
|
*
|
|
601
613
|
* @returns Returns given object wrapped with a dynamic getter proxy.
|
|
602
614
|
*/
|
|
603
|
-
static addDynamicGetterAndSetter<T = unknown>(object: T, getterWrapper?: GetterFunction | null, setterWrapper?: null | SetterFunction, methodNames?: Mapping, deep?: boolean, typesToExtend?: Array<unknown>): ProxyType<T> | T;
|
|
615
|
+
static addDynamicGetterAndSetter<T = unknown>(this: void, object: T, getterWrapper?: GetterFunction | null, setterWrapper?: null | SetterFunction, methodNames?: Mapping, deep?: boolean, typesToExtend?: Array<unknown>): ProxyType<T> | T;
|
|
604
616
|
/**
|
|
605
617
|
* Converts given object into its serialized json representation by
|
|
606
618
|
* replacing circular references with a given provided value.
|
|
@@ -608,7 +620,6 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
608
620
|
* This method traverses given object recursively and tracks of seen and
|
|
609
621
|
* already serialized structures to reuse generated strings or mark a
|
|
610
622
|
* circular reference.
|
|
611
|
-
*
|
|
612
623
|
* @param object - Object to serialize.
|
|
613
624
|
* @param determineCicularReferenceValue - Callback to create a fallback
|
|
614
625
|
* value depending on given redundant value.
|
|
@@ -616,37 +627,37 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
616
627
|
*
|
|
617
628
|
* @returns The formatted json string.
|
|
618
629
|
*/
|
|
619
|
-
static convertCircularObjectToJSON(object: unknown, determineCircularReferenceValue?: ((serializedValue: null | unknown, key: null | string, value: unknown, seenObjects: Map<unknown, null | unknown>) => unknown), numberOfSpaces?: number): ReturnType<typeof JSON.stringify> | undefined;
|
|
630
|
+
static convertCircularObjectToJSON(this: void, object: unknown, determineCircularReferenceValue?: ((serializedValue: null | unknown, key: null | string, value: unknown, seenObjects: Map<unknown, null | unknown>) => unknown), numberOfSpaces?: number): ReturnType<typeof JSON.stringify> | undefined;
|
|
620
631
|
/**
|
|
621
632
|
* Converts given map and all nested found maps objects to corresponding
|
|
622
633
|
* object.
|
|
623
634
|
* @param object - Map to convert to.
|
|
624
635
|
* @param deep - Indicates whether to perform a recursive conversion.
|
|
636
|
+
*
|
|
625
637
|
* @returns Given map as object.
|
|
626
638
|
*/
|
|
627
|
-
static convertMapToPlainObject(object: unknown, deep?: boolean): unknown;
|
|
639
|
+
static convertMapToPlainObject(this: void, object: unknown, deep?: boolean): unknown;
|
|
628
640
|
/**
|
|
629
641
|
* Converts given plain object and all nested found objects to
|
|
630
642
|
* corresponding map.
|
|
631
643
|
* @param object - Object to convert to.
|
|
632
644
|
* @param deep - Indicates whether to perform a recursive conversion.
|
|
645
|
+
*
|
|
633
646
|
* @returns Given object as map.
|
|
634
647
|
*/
|
|
635
|
-
static convertPlainObjectToMap(object: unknown, deep?: boolean): unknown;
|
|
648
|
+
static convertPlainObjectToMap(this: void, object: unknown, deep?: boolean): unknown;
|
|
636
649
|
/**
|
|
637
650
|
* Replaces given pattern in each value in given object recursively with
|
|
638
651
|
* given string replacement.
|
|
639
|
-
*
|
|
640
652
|
* @param object - Object to convert substrings in.
|
|
641
653
|
* @param pattern - Regular expression to replace.
|
|
642
654
|
* @param replacement - String to use as replacement for found patterns.
|
|
643
655
|
*
|
|
644
656
|
* @returns Converted object with replaced patterns.
|
|
645
657
|
*/
|
|
646
|
-
static convertSubstringInPlainObject<Type extends object = PlainObject>(object: Type, pattern: RegExp | string, replacement: string): Type;
|
|
658
|
+
static convertSubstringInPlainObject<Type extends object = PlainObject>(this: void, object: Type, pattern: RegExp | string, replacement: string): Type;
|
|
647
659
|
/**
|
|
648
660
|
* Copies given object (of any type) into optionally given destination.
|
|
649
|
-
*
|
|
650
661
|
* @param source - Object to copy.
|
|
651
662
|
* @param recursionLimit - Specifies how deep we should traverse into given
|
|
652
663
|
* object recursively.
|
|
@@ -663,18 +674,18 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
663
674
|
*
|
|
664
675
|
* @returns Value "true" if both objects are equal and "false" otherwise.
|
|
665
676
|
*/
|
|
666
|
-
static copy<Type = unknown>(source: Type, recursionLimit?: number, recursionEndValue?: unknown, destination?: null | Type, cyclic?: boolean, knownReferences?: Array<unknown>, recursionLevel?: number): Type;
|
|
677
|
+
static copy<Type = unknown>(this: void, source: Type, recursionLimit?: number, recursionEndValue?: unknown, destination?: null | Type, cyclic?: boolean, knownReferences?: Array<unknown>, recursionLevel?: number): Type;
|
|
667
678
|
/**
|
|
668
679
|
* Determine the internal JavaScript [[Class]] of an object.
|
|
669
680
|
* @param value - Value to analyze.
|
|
681
|
+
*
|
|
670
682
|
* @returns Name of determined type.
|
|
671
683
|
*/
|
|
672
|
-
static determineType(value?: unknown): string;
|
|
684
|
+
static determineType(this: void, value?: unknown): string;
|
|
673
685
|
/**
|
|
674
686
|
* Returns true if given items are equal for given property list. If
|
|
675
687
|
* property list isn't set all properties will be checked. All keys which
|
|
676
688
|
* starts with one of the exception prefixes will be omitted.
|
|
677
|
-
*
|
|
678
689
|
* @param firstValue - First object to compare.
|
|
679
690
|
* @param secondValue - Second object to compare.
|
|
680
691
|
*
|
|
@@ -698,12 +709,11 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
698
709
|
* environment and binary data is given, then a promise wrapping the
|
|
699
710
|
* determined boolean values is returned.
|
|
700
711
|
*/
|
|
701
|
-
static equals(firstValue: unknown, secondValue: unknown, givenOptions?: Partial<CompareOptions>): boolean | Promise<boolean | string> | string;
|
|
712
|
+
static equals(this: void, firstValue: unknown, secondValue: unknown, givenOptions?: Partial<CompareOptions>): boolean | Promise<boolean | string> | string;
|
|
702
713
|
/**
|
|
703
714
|
* Searches for nested mappings with given indicator key and resolves
|
|
704
715
|
* marked values. Additionally all objects are wrapped with a proxy to
|
|
705
716
|
* dynamically resolve nested properties.
|
|
706
|
-
*
|
|
707
717
|
* @param object - Given mapping to resolve.
|
|
708
718
|
* @param scope - Scope to to use evaluate again.
|
|
709
719
|
* @param selfReferenceName - Name to use for reference to given object.
|
|
@@ -714,19 +724,19 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
714
724
|
*
|
|
715
725
|
* @returns Evaluated given mapping.
|
|
716
726
|
*/
|
|
717
|
-
static evaluateDynamicData<Type = unknown>(object: null | RecursiveEvaluateable<Type>, scope?: Mapping<unknown>, selfReferenceName?: string, expressionIndicatorKey?: string, executionIndicatorKey?: string): Type;
|
|
727
|
+
static evaluateDynamicData<Type = unknown>(this: void, object: null | RecursiveEvaluateable<Type>, scope?: Mapping<unknown>, selfReferenceName?: string, expressionIndicatorKey?: string, executionIndicatorKey?: string): Type;
|
|
718
728
|
/**
|
|
719
729
|
* Removes properties in objects where a dynamic indicator lives.
|
|
720
730
|
* @param data - Object to traverse recursively.
|
|
721
731
|
* @param expressionIndicators - Property key to remove.
|
|
732
|
+
*
|
|
722
733
|
* @returns Given object with removed properties.
|
|
723
734
|
*/
|
|
724
|
-
static removeKeysInEvaluation<T = PlainObject>(data: T, expressionIndicators?: Array<string>): T;
|
|
735
|
+
static removeKeysInEvaluation<T = PlainObject>(this: void, data: T, expressionIndicators?: Array<string>): T;
|
|
725
736
|
/**
|
|
726
737
|
* Extends given target object with given sources object. As target and
|
|
727
738
|
* sources many expandable types are allowed but target and sources have to
|
|
728
739
|
* to come from the same type.
|
|
729
|
-
*
|
|
730
740
|
* @param targetOrDeepIndicator - Maybe the target or deep indicator.
|
|
731
741
|
* @param targetOrSource - Target or source object; depending on first
|
|
732
742
|
* argument.
|
|
@@ -734,11 +744,10 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
734
744
|
*
|
|
735
745
|
* @returns Returns given target extended with all given sources.
|
|
736
746
|
*/
|
|
737
|
-
static extend<T = Mapping<unknown>>(targetOrDeepIndicator: boolean | typeof IgnoreNullAndUndefinedSymbol | RecursivePartial<T>, targetOrSource?: RecursivePartial<T>, ...additionalSources: Array<RecursivePartial<T>>): T;
|
|
747
|
+
static extend<T = Mapping<unknown>>(this: void, targetOrDeepIndicator: boolean | typeof IgnoreNullAndUndefinedSymbol | RecursivePartial<T>, targetOrSource?: RecursivePartial<T>, ...additionalSources: Array<RecursivePartial<T>>): T;
|
|
738
748
|
/**
|
|
739
749
|
* Retrieves substructure in given object referenced by given selector
|
|
740
750
|
* path.
|
|
741
|
-
*
|
|
742
751
|
* @param target - Object to search in.
|
|
743
752
|
* @param selector - Selector path.
|
|
744
753
|
* @param skipMissingLevel - Indicates to skip missing level in given path.
|
|
@@ -746,34 +755,31 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
746
755
|
*
|
|
747
756
|
* @returns Determined sub structure of given data or "undefined".
|
|
748
757
|
*/
|
|
749
|
-
static getSubstructure<T = unknown, E = unknown>(target: T, selector: Selector<T, E>, skipMissingLevel?: boolean, delimiter?: string): E;
|
|
758
|
+
static getSubstructure<T = unknown, E = unknown>(this: void, target: T, selector: Selector<T, E>, skipMissingLevel?: boolean, delimiter?: string): E;
|
|
750
759
|
/**
|
|
751
760
|
* Generates a proxy handler which forwards all operations to given object
|
|
752
761
|
* as there wouldn't be a proxy.
|
|
753
|
-
*
|
|
754
762
|
* @param target - Object to proxy.
|
|
755
763
|
* @param methodNames - Mapping of operand name to object specific method
|
|
756
764
|
* name.
|
|
757
765
|
*
|
|
758
766
|
* @returns Determined proxy handler.
|
|
759
767
|
*/
|
|
760
|
-
static getProxyHandler<T = unknown>(target: T, methodNames?: Mapping): ProxyHandler<T>;
|
|
768
|
+
static getProxyHandler<T = unknown>(this: void, target: T, methodNames?: Mapping): ProxyHandler<T>;
|
|
761
769
|
/**
|
|
762
770
|
* Slices all properties from given object which does not match provided
|
|
763
771
|
* object mask. Items can be explicitly white listed via "include" mask
|
|
764
772
|
* configuration or black listed via "exclude" mask configuration.
|
|
765
|
-
*
|
|
766
773
|
* @param object - Object to slice.
|
|
767
774
|
* @param mask - Mask configuration.
|
|
768
775
|
*
|
|
769
776
|
* @returns Given but sliced object. If (nested) object will be modified a
|
|
770
777
|
* flat copy of that object will be returned.
|
|
771
778
|
*/
|
|
772
|
-
static mask<Type = object>(object: Type, mask: ObjectMaskConfiguration): RecursivePartial<Type>;
|
|
779
|
+
static mask<Type = object>(this: void, object: Type, mask: ObjectMaskConfiguration): RecursivePartial<Type>;
|
|
773
780
|
/**
|
|
774
781
|
* Modifies given target corresponding to given source and removes source
|
|
775
782
|
* modification infos.
|
|
776
|
-
*
|
|
777
783
|
* @param target - Object to modify.
|
|
778
784
|
* @param source - Source object to load modifications from.
|
|
779
785
|
* @param removeIndicatorKey - Indicator property name or value to mark a
|
|
@@ -793,10 +799,9 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
793
799
|
*
|
|
794
800
|
* @returns Given target modified with given source.
|
|
795
801
|
*/
|
|
796
|
-
static modifyObject<T = unknown>(target: T, source: unknown, removeIndicatorKey?: string, prependIndicatorKey?: string, appendIndicatorKey?: string, positionPrefix?: string, positionSuffix?: string, parentSource?: unknown, parentKey?: unknown): T | null;
|
|
802
|
+
static modifyObject<T = unknown>(this: void, target: T, source: unknown, removeIndicatorKey?: string, prependIndicatorKey?: string, appendIndicatorKey?: string, positionPrefix?: string, positionSuffix?: string, parentSource?: unknown, parentKey?: unknown): T | null;
|
|
797
803
|
/**
|
|
798
804
|
* Interprets a date object from given artefact.
|
|
799
|
-
*
|
|
800
805
|
* @param value - To interpret.
|
|
801
806
|
* @param interpretAsUTC - Identifies if given date should be interpret as
|
|
802
807
|
* utc.
|
|
@@ -804,17 +809,17 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
804
809
|
* @returns Interpreted date object or "null" if given value couldn't be
|
|
805
810
|
* interpret.
|
|
806
811
|
*/
|
|
807
|
-
static normalizeDateTime(value?: string | null | number | Date, interpretAsUTC?: boolean): Date | null;
|
|
812
|
+
static normalizeDateTime(this: void, value?: string | null | number | Date, interpretAsUTC?: boolean): Date | null;
|
|
808
813
|
/**
|
|
809
814
|
* Removes given key from given object recursively.
|
|
810
815
|
* @param object - Object to process.
|
|
811
816
|
* @param keys - List of keys to remove.
|
|
817
|
+
*
|
|
812
818
|
* @returns Processed given object.
|
|
813
819
|
*/
|
|
814
|
-
static removeKeyPrefixes<T>(object: T, keys?: Array<string> | string): T;
|
|
820
|
+
static removeKeyPrefixes<T>(this: void, object: T, keys?: Array<string> | string): T;
|
|
815
821
|
/**
|
|
816
822
|
* Represents given object as formatted string.
|
|
817
|
-
*
|
|
818
823
|
* @param object - Object to represent.
|
|
819
824
|
* @param indention - String (usually whitespaces) to use as indention.
|
|
820
825
|
* @param initialIndention - String (usually whitespaces) to use as
|
|
@@ -826,90 +831,83 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
826
831
|
*
|
|
827
832
|
* @returns Representation string.
|
|
828
833
|
*/
|
|
829
|
-
static represent(object: unknown, indention?: string, initialIndention?: string, maximumNumberOfLevelsReachedIdentifier?: number | string, numberOfLevels?: number): string;
|
|
834
|
+
static represent(this: void, object: unknown, indention?: string, initialIndention?: string, maximumNumberOfLevelsReachedIdentifier?: number | string, numberOfLevels?: number): string;
|
|
830
835
|
/**
|
|
831
836
|
* Sort given objects keys.
|
|
832
837
|
* @param object - Object which keys should be sorted.
|
|
838
|
+
*
|
|
833
839
|
* @returns Sorted list of given keys.
|
|
834
840
|
*/
|
|
835
|
-
static sort(object: unknown): Array<unknown>;
|
|
841
|
+
static sort(this: void, object: unknown): Array<unknown>;
|
|
836
842
|
/**
|
|
837
843
|
* Removes a proxy from given data structure recursively.
|
|
838
|
-
*
|
|
839
844
|
* @param object - Object to proxy.
|
|
840
845
|
* @param seenObjects - Tracks all already processed objects to avoid
|
|
841
846
|
* endless loops (usually only needed for internal purpose).
|
|
842
847
|
*
|
|
843
848
|
* @returns Returns given object unwrapped from a dynamic proxy.
|
|
844
849
|
*/
|
|
845
|
-
static unwrapProxy<T = unknown>(object: T, seenObjects?: Set<unknown>): T;
|
|
850
|
+
static unwrapProxy<T = unknown>(this: void, object: T, seenObjects?: Set<unknown>): T;
|
|
846
851
|
/**
|
|
847
852
|
* Summarizes given property of given item list.
|
|
848
|
-
*
|
|
849
853
|
* @param data - Array of objects with given property name.
|
|
850
854
|
* @param propertyName - Property name to summarize.
|
|
851
855
|
* @param defaultValue - Value to return if property values doesn't match.
|
|
852
856
|
*
|
|
853
857
|
* @returns Aggregated value.
|
|
854
858
|
*/
|
|
855
|
-
static arrayAggregatePropertyIfEqual<T = unknown>(data: Array<Mapping<unknown>>, propertyName: string, defaultValue?: T): T;
|
|
859
|
+
static arrayAggregatePropertyIfEqual<T = unknown>(this: void, data: Array<Mapping<unknown>>, propertyName: string, defaultValue?: T): T;
|
|
856
860
|
/**
|
|
857
861
|
* Deletes every item witch has only empty attributes for given property
|
|
858
862
|
* names. If given property names are empty each attribute will be
|
|
859
863
|
* considered. The empty string, "null" and "undefined" will be interpreted
|
|
860
864
|
* as empty.
|
|
861
|
-
*
|
|
862
865
|
* @param data - Data to filter.
|
|
863
866
|
* @param propertyNames - Properties to consider.
|
|
864
867
|
*
|
|
865
868
|
* @returns Given data without empty items.
|
|
866
869
|
*/
|
|
867
|
-
static arrayDeleteEmptyItems<T = Mapping<unknown>>(data: Array<T>, propertyNames?: Array<string | symbol>): Array<T>;
|
|
870
|
+
static arrayDeleteEmptyItems<T = Mapping<unknown>>(this: void, data: Array<T>, propertyNames?: Array<string | symbol>): Array<T>;
|
|
868
871
|
/**
|
|
869
872
|
* Extracts all properties from all items wich occur in given property
|
|
870
873
|
* names.
|
|
871
|
-
*
|
|
872
874
|
* @param data - Data where each item should be sliced.
|
|
873
875
|
* @param propertyNames - Property names to extract.
|
|
874
876
|
*
|
|
875
877
|
* @returns Data with sliced items.
|
|
876
878
|
*/
|
|
877
|
-
static arrayExtract<T = Mapping<unknown>>(data: unknown, propertyNames: Array<string>): Array<T>;
|
|
879
|
+
static arrayExtract<T = Mapping<unknown>>(this: void, data: unknown, propertyNames: Array<string>): Array<T>;
|
|
878
880
|
/**
|
|
879
881
|
* Extracts all values which matches given regular expression.
|
|
880
|
-
*
|
|
881
882
|
* @param data - Data to filter.
|
|
882
883
|
* @param regularExpression - Pattern to match for.
|
|
883
884
|
*
|
|
884
885
|
* @returns Filtered data.
|
|
885
886
|
*/
|
|
886
|
-
static arrayExtractIfMatches(data: unknown, regularExpression: string | RegExp): Array<string>;
|
|
887
|
+
static arrayExtractIfMatches(this: void, data: unknown, regularExpression: string | RegExp): Array<string>;
|
|
887
888
|
/**
|
|
888
889
|
* Filters given data if given property is set or not.
|
|
889
|
-
*
|
|
890
890
|
* @param data - Data to filter.
|
|
891
891
|
* @param propertyName - Property name to check for existence.
|
|
892
892
|
*
|
|
893
893
|
* @returns Given data without the items which doesn't have specified
|
|
894
894
|
* property.
|
|
895
895
|
*/
|
|
896
|
-
static arrayExtractIfPropertyExists<T = unknown>(data: unknown, propertyName: string): Array<T>;
|
|
896
|
+
static arrayExtractIfPropertyExists<T = unknown>(this: void, data: unknown, propertyName: string): Array<T>;
|
|
897
897
|
/**
|
|
898
898
|
* Extract given data where specified property value matches given
|
|
899
899
|
* patterns.
|
|
900
|
-
*
|
|
901
900
|
* @param data - Data to filter.
|
|
902
901
|
* @param propertyPattern - Mapping of property names to pattern.
|
|
903
902
|
*
|
|
904
903
|
* @returns Filtered data.
|
|
905
904
|
*/
|
|
906
|
-
static arrayExtractIfPropertyMatches<T = unknown>(data: unknown, propertyPattern: Mapping<RegExp | string>): Array<T>;
|
|
905
|
+
static arrayExtractIfPropertyMatches<T = unknown>(this: void, data: unknown, propertyPattern: Mapping<RegExp | string>): Array<T>;
|
|
907
906
|
/**
|
|
908
907
|
* Determines all objects which exists in "first" and in "second".
|
|
909
908
|
* Object key which will be compared are given by "keys". If an empty array
|
|
910
909
|
* is given each key will be compared. If an object is given corresponding
|
|
911
910
|
* initial data key will be mapped to referenced new data key.
|
|
912
|
-
*
|
|
913
911
|
* @param first - Referenced data to check for.
|
|
914
912
|
* @param second - Data to check for existence.
|
|
915
913
|
* @param keys - Keys to define equality.
|
|
@@ -919,15 +917,14 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
919
917
|
*
|
|
920
918
|
* @returns Data which does exit in given initial data.
|
|
921
919
|
*/
|
|
922
|
-
static arrayIntersect<T = unknown>(first: unknown, second: unknown, keys?: Array<string> | Mapping<number | string>, strict?: boolean): Array<T>;
|
|
920
|
+
static arrayIntersect<T = unknown>(this: void, first: unknown, second: unknown, keys?: Array<string> | Mapping<number | string>, strict?: boolean): Array<T>;
|
|
923
921
|
/**
|
|
924
922
|
* Converts given object into an array.
|
|
925
|
-
*
|
|
926
923
|
* @param object - Target to convert.
|
|
927
924
|
*
|
|
928
925
|
* @returns Generated array.
|
|
929
926
|
*/
|
|
930
|
-
static arrayMake<T = unknown>(object: unknown): Array<T>;
|
|
927
|
+
static arrayMake<T = unknown>(this: void, object: unknown): Array<T>;
|
|
931
928
|
/**
|
|
932
929
|
* Creates a list of items within given range.
|
|
933
930
|
* @param range - Array of lower and upper bounds. If only one value is
|
|
@@ -936,19 +933,20 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
936
933
|
* numbers are provided given range will be returned.
|
|
937
934
|
* @param step - Space between two consecutive values.
|
|
938
935
|
* @param ignoreLastStep - Removes last step.
|
|
936
|
+
*
|
|
939
937
|
* @returns Produced array of integers.
|
|
940
938
|
*/
|
|
941
|
-
static arrayMakeRange(range: number | [number] | [number, number] | Array<number>, step?: number, ignoreLastStep?: boolean): Array<number>;
|
|
939
|
+
static arrayMakeRange(this: void, range: number | [number] | [number, number] | Array<number>, step?: number, ignoreLastStep?: boolean): Array<number>;
|
|
942
940
|
/**
|
|
943
941
|
* Merge the contents of two arrays together into the first array.
|
|
944
942
|
* @param target - Target array.
|
|
945
943
|
* @param source - Source array.
|
|
944
|
+
*
|
|
946
945
|
* @returns Target array with merged given source one.
|
|
947
946
|
*/
|
|
948
|
-
static arrayMerge<T = unknown>(target: Array<T>, source: Array<T>): Array<T>;
|
|
947
|
+
static arrayMerge<T = unknown>(this: void, target: Array<T>, source: Array<T>): Array<T>;
|
|
949
948
|
/**
|
|
950
949
|
* Generates a list if pagination symbols to render a pagination from.
|
|
951
|
-
*
|
|
952
950
|
* @param options - Configure bounds and current page of pagination to
|
|
953
951
|
* determine.
|
|
954
952
|
* @param options.boundaryCount - Indicates where to start pagination
|
|
@@ -970,33 +968,33 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
970
968
|
*
|
|
971
969
|
* @returns A list of pagination symbols.
|
|
972
970
|
*/
|
|
973
|
-
static arrayPaginate(options?: Partial<PaginateOptions>): Array<Page>;
|
|
971
|
+
static arrayPaginate(this: void, options?: Partial<PaginateOptions>): Array<Page>;
|
|
974
972
|
/**
|
|
975
973
|
* Generates all permutations of given iterable.
|
|
976
974
|
* @param data - Array like object.
|
|
975
|
+
*
|
|
977
976
|
* @returns Array of permuted arrays.
|
|
978
977
|
*/
|
|
979
|
-
static arrayPermutate<T = unknown>(data: Array<T>): Array<Array<T>>;
|
|
978
|
+
static arrayPermutate<T = unknown>(this: void, data: Array<T>): Array<Array<T>>;
|
|
980
979
|
/**
|
|
981
980
|
* Generates all lengths permutations of given iterable.
|
|
982
|
-
*
|
|
983
981
|
* @param data - Array like object.
|
|
984
982
|
* @param minimalSubsetLength - Defines how long the minimal subset length
|
|
985
983
|
* should be.
|
|
986
984
|
*
|
|
987
985
|
* @returns Array of permuted arrays.
|
|
988
986
|
*/
|
|
989
|
-
static arrayPermutateLength<T = unknown>(data: Array<T>, minimalSubsetLength?: number): Array<Array<T>>;
|
|
987
|
+
static arrayPermutateLength<T = unknown>(this: void, data: Array<T>, minimalSubsetLength?: number): Array<Array<T>>;
|
|
990
988
|
/**
|
|
991
989
|
* Sums up given property of given item list.
|
|
992
990
|
* @param data - The objects with specified property to sum up.
|
|
993
991
|
* @param propertyName - Property name to sum up its value.
|
|
992
|
+
*
|
|
994
993
|
* @returns The aggregated value.
|
|
995
994
|
*/
|
|
996
|
-
static arraySumUpProperty(data: unknown, propertyName: string): number;
|
|
995
|
+
static arraySumUpProperty(this: void, data: unknown, propertyName: string): number;
|
|
997
996
|
/**
|
|
998
997
|
* Adds an item to another item as array connection (many to one).
|
|
999
|
-
*
|
|
1000
998
|
* @param item - Item where the item should be appended to.
|
|
1001
999
|
* @param target - Target to add to given item.
|
|
1002
1000
|
* @param name - Name of the target connection.
|
|
@@ -1005,10 +1003,9 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1005
1003
|
*
|
|
1006
1004
|
* @returns Item with the appended target.
|
|
1007
1005
|
*/
|
|
1008
|
-
static arrayAppendAdd<T = unknown>(item: Mapping<T>, target: unknown, name: string, checkIfExists?: boolean): Mapping<T>;
|
|
1006
|
+
static arrayAppendAdd<T = unknown>(this: void, item: Mapping<T>, target: unknown, name: string, checkIfExists?: boolean): Mapping<T>;
|
|
1009
1007
|
/**
|
|
1010
1008
|
* Removes given target on given list.
|
|
1011
|
-
*
|
|
1012
1009
|
* @param list - Array to splice.
|
|
1013
1010
|
* @param target - Target to remove from given list.
|
|
1014
1011
|
* @param strict - Indicates whether to fire an exception if given target
|
|
@@ -1016,67 +1013,62 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1016
1013
|
*
|
|
1017
1014
|
* @returns Item with the appended target.
|
|
1018
1015
|
*/
|
|
1019
|
-
static arrayRemove<T = unknown>(list: Array<T>, target: T, strict?: boolean): Array<T>;
|
|
1016
|
+
static arrayRemove<T = unknown>(this: void, list: Array<T>, target: T, strict?: boolean): Array<T>;
|
|
1020
1017
|
/**
|
|
1021
1018
|
* Sorts given object of dependencies in a topological order.
|
|
1022
1019
|
* @param items - Items to sort.
|
|
1020
|
+
*
|
|
1023
1021
|
* @returns Sorted array of given items respecting their dependencies.
|
|
1024
1022
|
*/
|
|
1025
|
-
static arraySortTopological(items: Mapping<Array<string> | string>): Array<string>;
|
|
1023
|
+
static arraySortTopological(this: void, items: Mapping<Array<string> | string>): Array<string>;
|
|
1026
1024
|
/**
|
|
1027
1025
|
* Makes all values in given iterable unique by removing duplicates (The
|
|
1028
1026
|
* first occurrences will be left).
|
|
1029
|
-
*
|
|
1030
1027
|
* @param data - Array like object.
|
|
1031
1028
|
*
|
|
1032
1029
|
* @returns Sliced version of given object.
|
|
1033
1030
|
*/
|
|
1034
|
-
static arrayUnique<T = unknown>(data: Array<T>): Array<T>;
|
|
1031
|
+
static arrayUnique<T = unknown>(this: void, data: Array<T>): Array<T>;
|
|
1035
1032
|
/**
|
|
1036
1033
|
* Translates given string into the regular expression validated
|
|
1037
1034
|
* representation.
|
|
1038
|
-
*
|
|
1039
1035
|
* @param value - String to convert.
|
|
1040
1036
|
* @param excludeSymbols - Symbols not to escape.
|
|
1041
1037
|
*
|
|
1042
1038
|
* @returns Converted string.
|
|
1043
1039
|
*/
|
|
1044
|
-
static stringEscapeRegularExpressions(value: string, excludeSymbols?: Array<string>): string;
|
|
1040
|
+
static stringEscapeRegularExpressions(this: void, value: string, excludeSymbols?: Array<string>): string;
|
|
1045
1041
|
/**
|
|
1046
|
-
* Translates given name into a valid javaScript one.
|
|
1047
|
-
*
|
|
1042
|
+
* Translates given name into a valid javaScript one. *
|
|
1048
1043
|
* @param name - Name to convert.
|
|
1049
1044
|
* @param allowedSymbols - String of symbols which should be allowed within
|
|
1050
1045
|
* a variable name (not the first character).
|
|
1051
1046
|
*
|
|
1052
1047
|
* @returns Converted name is returned.
|
|
1053
1048
|
*/
|
|
1054
|
-
static stringConvertToValidVariableName(name: string, allowedSymbols?: string): string;
|
|
1049
|
+
static stringConvertToValidVariableName(this: void, name: string, allowedSymbols?: string): string;
|
|
1055
1050
|
/**
|
|
1056
1051
|
* This method is intended for encoding *key* or *value* parts of query
|
|
1057
1052
|
* component. We need a custom method because "encodeURIComponent()" is too
|
|
1058
1053
|
* aggressive and encodes stuff that doesn't have to be encoded per
|
|
1059
1054
|
* "http://tools.ietf.org/html/rfc3986:".
|
|
1060
|
-
*
|
|
1061
1055
|
* @param url - URL to encode.
|
|
1062
1056
|
* @param encodeSpaces - Indicates whether given url should encode
|
|
1063
1057
|
* whitespaces as "+" or "%20".
|
|
1064
1058
|
*
|
|
1065
1059
|
* @returns Encoded given url.
|
|
1066
1060
|
*/
|
|
1067
|
-
static stringEncodeURIComponent(url: string, encodeSpaces?: boolean): string;
|
|
1061
|
+
static stringEncodeURIComponent(this: void, url: string, encodeSpaces?: boolean): string;
|
|
1068
1062
|
/**
|
|
1069
1063
|
* Appends a path selector to the given path if there isn't one yet.
|
|
1070
|
-
*
|
|
1071
1064
|
* @param path - The path for appending a selector.
|
|
1072
1065
|
* @param pathSeparator - The selector for appending to path.
|
|
1073
1066
|
*
|
|
1074
1067
|
* @returns The appended path.
|
|
1075
1068
|
*/
|
|
1076
|
-
static stringAddSeparatorToPath(path: string, pathSeparator?: string): string;
|
|
1069
|
+
static stringAddSeparatorToPath(this: void, path: string, pathSeparator?: string): string;
|
|
1077
1070
|
/**
|
|
1078
1071
|
* Checks if given path has given path prefix.
|
|
1079
|
-
*
|
|
1080
1072
|
* @param prefix - Path prefix to search for.
|
|
1081
1073
|
* @param path - Path to search in.
|
|
1082
1074
|
* @param separator - Delimiter to use in path (default is the posix
|
|
@@ -1084,25 +1076,23 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1084
1076
|
*
|
|
1085
1077
|
* @returns Value "true" if given prefix occur and "false" otherwise.
|
|
1086
1078
|
*/
|
|
1087
|
-
static stringHasPathPrefix(prefix?: unknown, path?: string, separator?: string): boolean;
|
|
1079
|
+
static stringHasPathPrefix(this: void, prefix?: unknown, path?: string, separator?: string): boolean;
|
|
1088
1080
|
/**
|
|
1089
1081
|
* Extracts domain name from given url. If no explicit domain name given
|
|
1090
1082
|
* current domain name will be assumed. If no parameter given current
|
|
1091
1083
|
* domain name will be determined.
|
|
1092
|
-
*
|
|
1093
1084
|
* @param url - The url to extract domain from.
|
|
1094
1085
|
* @param fallback - The fallback host name if no one exits in given url
|
|
1095
1086
|
* (default is current hostname).
|
|
1096
1087
|
*
|
|
1097
1088
|
* @returns Extracted domain.
|
|
1098
1089
|
*/
|
|
1099
|
-
static stringGetDomainName(url?: string, fallback?: string): string;
|
|
1090
|
+
static stringGetDomainName(this: void, url?: string, fallback?: string): string;
|
|
1100
1091
|
/**
|
|
1101
1092
|
* Extracts port number from given url. If no explicit port number given
|
|
1102
1093
|
* and no fallback is defined current port number will be assumed for local
|
|
1103
1094
|
* links. For external links 80 will be assumed for http protocols and 443
|
|
1104
1095
|
* for https protocols.
|
|
1105
|
-
*
|
|
1106
1096
|
* @param url - The url to extract port from.
|
|
1107
1097
|
* @param fallback - Fallback port number if no explicit one was found.
|
|
1108
1098
|
* Default is derived from current protocol name.
|
|
@@ -1112,23 +1102,21 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1112
1102
|
*
|
|
1113
1103
|
* @returns Extracted port number.
|
|
1114
1104
|
*/
|
|
1115
|
-
static stringGetPortNumber(url?: string, fallback?: null | number, parameter?: Array<string>): null | number;
|
|
1105
|
+
static stringGetPortNumber(this: void, url?: string, fallback?: null | number, parameter?: Array<string>): null | number;
|
|
1116
1106
|
/**
|
|
1117
1107
|
* Extracts protocol name from given url. If no explicit url is given,
|
|
1118
1108
|
* current protocol will be assumed. If no parameter given current protocol
|
|
1119
1109
|
* number will be determined.
|
|
1120
|
-
*
|
|
1121
1110
|
* @param url - The url to extract protocol from.
|
|
1122
1111
|
* @param fallback - Fallback port to use if no protocol exists in given
|
|
1123
1112
|
* url (default is current protocol).
|
|
1124
1113
|
*
|
|
1125
1114
|
* @returns Extracted protocol.
|
|
1126
1115
|
*/
|
|
1127
|
-
static stringGetProtocolName(url?: string, fallback?: string): string;
|
|
1116
|
+
static stringGetProtocolName(this: void, url?: string, fallback?: string): string;
|
|
1128
1117
|
/**
|
|
1129
1118
|
* Read a page's GET URL variables and return them as an associative array
|
|
1130
1119
|
* and preserves ordering.
|
|
1131
|
-
*
|
|
1132
1120
|
* @param keyToGet - If provided the corresponding value for given key is
|
|
1133
1121
|
* returned or full object otherwise.
|
|
1134
1122
|
* @param allowDuplicates - Indicates whether to return arrays of values or
|
|
@@ -1153,60 +1141,64 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1153
1141
|
* @returns Returns the current get array or requested value. If requested
|
|
1154
1142
|
* key doesn't exist "undefined" is returned.
|
|
1155
1143
|
*/
|
|
1156
|
-
static stringGetURLParameter(keyToGet?: null | string, allowDuplicates?: boolean, givenInput?: null | string, subDelimiter?: string, hashedPathIndicator?: string, givenSearch?: null | string, givenHash?: string): Array<string> | null | QueryParameters | string;
|
|
1144
|
+
static stringGetURLParameter(this: void, keyToGet?: null | string, allowDuplicates?: boolean, givenInput?: null | string, subDelimiter?: string, hashedPathIndicator?: string, givenSearch?: null | string, givenHash?: string): Array<string> | null | QueryParameters | string;
|
|
1157
1145
|
/**
|
|
1158
1146
|
* Checks if given url points to another "service" than second given url.
|
|
1159
1147
|
* If no second given url provided current url will be assumed.
|
|
1160
|
-
*
|
|
1161
1148
|
* @param url - URL to check against second url.
|
|
1162
1149
|
* @param referenceURL - URL to check against first url.
|
|
1163
1150
|
*
|
|
1164
1151
|
* @returns Returns "true" if given first url has same domain as given
|
|
1165
1152
|
* second (or current).
|
|
1166
1153
|
*/
|
|
1167
|
-
static stringServiceURLEquals(url: string, referenceURL?: string): boolean;
|
|
1154
|
+
static stringServiceURLEquals(this: void, url: string, referenceURL?: string): boolean;
|
|
1168
1155
|
/**
|
|
1169
1156
|
* Normalized given website url.
|
|
1170
1157
|
* @param url - Uniform resource locator to normalize.
|
|
1158
|
+
*
|
|
1171
1159
|
* @returns Normalized result.
|
|
1172
1160
|
*/
|
|
1173
|
-
static stringNormalizeURL(url: string): string;
|
|
1161
|
+
static stringNormalizeURL(this: void, url: string): string;
|
|
1174
1162
|
/**
|
|
1175
1163
|
* Represents given website url.
|
|
1176
1164
|
* @param url - Uniform resource locator to represent.
|
|
1165
|
+
*
|
|
1177
1166
|
* @returns Represented result.
|
|
1178
1167
|
*/
|
|
1179
|
-
static stringRepresentURL(url: unknown): string;
|
|
1168
|
+
static stringRepresentURL(this: void, url: unknown): string;
|
|
1180
1169
|
/**
|
|
1181
1170
|
* Converts a camel cased string to its delimited string version.
|
|
1182
|
-
* @param
|
|
1171
|
+
* @param value - The string to format.
|
|
1183
1172
|
* @param delimiter - Delimiter string
|
|
1184
1173
|
* @param abbreviations - Collection of shortcut words to represent upper
|
|
1185
1174
|
* cased.
|
|
1175
|
+
*
|
|
1186
1176
|
* @returns The formatted string.
|
|
1187
1177
|
*/
|
|
1188
|
-
static stringCamelCaseToDelimited(string: string, delimiter?: string, abbreviations?: Array<string> | null): string;
|
|
1178
|
+
static stringCamelCaseToDelimited(this: void, string: string, delimiter?: string, abbreviations?: Array<string> | null): string;
|
|
1189
1179
|
/**
|
|
1190
1180
|
* Converts a string to its capitalize representation.
|
|
1191
1181
|
* @param string - The string to format.
|
|
1182
|
+
*
|
|
1192
1183
|
* @returns The formatted string.
|
|
1193
1184
|
*/
|
|
1194
|
-
static stringCapitalize(string: string): string;
|
|
1185
|
+
static stringCapitalize(this: void, string: string): string;
|
|
1195
1186
|
/**
|
|
1196
1187
|
* Compresses given style attribute value.
|
|
1197
1188
|
* @param styleValue - Style value to compress.
|
|
1189
|
+
*
|
|
1198
1190
|
* @returns The compressed value.
|
|
1199
1191
|
*/
|
|
1200
|
-
static stringCompressStyleValue(styleValue: string): string;
|
|
1192
|
+
static stringCompressStyleValue(this: void, styleValue: string): string;
|
|
1201
1193
|
/**
|
|
1202
1194
|
* Decodes all html symbols in text nodes in given html string.
|
|
1203
1195
|
* @param htmlString - HTML string to decode.
|
|
1196
|
+
*
|
|
1204
1197
|
* @returns Decoded html string.
|
|
1205
1198
|
*/
|
|
1206
|
-
static stringDecodeHTMLEntities(htmlString: string): null | string;
|
|
1199
|
+
static stringDecodeHTMLEntities(this: void, htmlString: string): null | string;
|
|
1207
1200
|
/**
|
|
1208
1201
|
* Converts a delimited string to its camel case representation.
|
|
1209
|
-
*
|
|
1210
1202
|
* @param string - The string to format.
|
|
1211
1203
|
* @param delimiter - Delimiter string to use.
|
|
1212
1204
|
* @param abbreviations - Collection of shortcut words to represent upper
|
|
@@ -1218,10 +1210,9 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1218
1210
|
*
|
|
1219
1211
|
* @returns The formatted string.
|
|
1220
1212
|
*/
|
|
1221
|
-
static stringDelimitedToCamelCase(
|
|
1213
|
+
static stringDelimitedToCamelCase(this: void, value: string, delimiter?: string, abbreviations?: Array<string> | null, preserveWrongFormattedAbbreviations?: boolean, removeMultipleDelimiter?: boolean): string;
|
|
1222
1214
|
/**
|
|
1223
1215
|
* Compiles a given string as expression with given scope names.
|
|
1224
|
-
*
|
|
1225
1216
|
* @param expression - The string to interpret.
|
|
1226
1217
|
* @param scope - Scope to extract names from.
|
|
1227
1218
|
* @param execute - Indicates whether to execute or evaluate.
|
|
@@ -1229,10 +1220,9 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1229
1220
|
* @returns Object of prepared scope name mappings and compiled function or
|
|
1230
1221
|
* error string message if given expression couldn't be compiled.
|
|
1231
1222
|
*/
|
|
1232
|
-
static stringCompile(expression: string, scope?: Array<string> | Mapping<unknown> | string, execute?: boolean): CompilationResult
|
|
1223
|
+
static stringCompile<T = string>(this: void, expression: string, scope?: Array<string> | Mapping<unknown> | string, execute?: boolean): CompilationResult<T>;
|
|
1233
1224
|
/**
|
|
1234
1225
|
* Evaluates a given string as expression against given scope.
|
|
1235
|
-
*
|
|
1236
1226
|
* @param expression - The string to interpret.
|
|
1237
1227
|
* @param scope - Scope to render against.
|
|
1238
1228
|
* @param binding - Object to apply as "this" in evaluation scope.
|
|
@@ -1240,11 +1230,10 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1240
1230
|
*
|
|
1241
1231
|
* @returns Object with error message during parsing / running or result.
|
|
1242
1232
|
*/
|
|
1243
|
-
static stringEvaluate(expression: string, scope?: Mapping<unknown>, execute?: boolean, binding?: unknown): EvaluationResult
|
|
1233
|
+
static stringEvaluate<T = string>(this: void, expression: string, scope?: Mapping<unknown>, execute?: boolean, binding?: unknown): EvaluationResult<T>;
|
|
1244
1234
|
/**
|
|
1245
1235
|
* Finds the string match of given query in given target text by applying
|
|
1246
1236
|
* given normalisation function to target and query.
|
|
1247
|
-
*
|
|
1248
1237
|
* @param target - Target to search in.
|
|
1249
1238
|
* @param query - Search string to search for.
|
|
1250
1239
|
* @param normalizer - Function to use as normalisation for queries and
|
|
@@ -1253,49 +1242,51 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1253
1242
|
*
|
|
1254
1243
|
* @returns Start and end index of matching range.
|
|
1255
1244
|
*/
|
|
1256
|
-
static stringFindNormalizedMatchRange(target: unknown, query: unknown, normalizer?:
|
|
1245
|
+
static stringFindNormalizedMatchRange(this: void, target: unknown, query: unknown, normalizer?: AnyFunction, skipTags?: boolean): Array<number> | null;
|
|
1257
1246
|
/**
|
|
1258
1247
|
* Performs a string formation. Replaces every placeholder "{i}" with the
|
|
1259
1248
|
* i'th argument.
|
|
1260
|
-
*
|
|
1261
1249
|
* @param string - The string to format.
|
|
1262
1250
|
* @param additionalArguments - Additional arguments are interpreted as
|
|
1263
1251
|
* replacements for string formatting.
|
|
1264
1252
|
*
|
|
1265
1253
|
* @returns The formatted string.
|
|
1266
1254
|
*/
|
|
1267
|
-
static stringFormat(string: string, ...additionalArguments: Array<unknown>): string;
|
|
1255
|
+
static stringFormat(this: void, string: string, ...additionalArguments: Array<unknown>): string;
|
|
1268
1256
|
/**
|
|
1269
1257
|
* Calculates the edit (levenstein) distance between two given strings.
|
|
1270
1258
|
* @param first - First string to compare.
|
|
1271
1259
|
* @param second - Second string to compare.
|
|
1260
|
+
*
|
|
1272
1261
|
* @returns The distance as number.
|
|
1273
1262
|
*/
|
|
1274
|
-
static stringGetEditDistance(first: string, second: string): number;
|
|
1263
|
+
static stringGetEditDistance(this: void, first: string, second: string): number;
|
|
1275
1264
|
/**
|
|
1276
1265
|
* Validates the current string for using in a regular expression pattern.
|
|
1277
1266
|
* Special regular expression chars will be escaped.
|
|
1278
|
-
* @param
|
|
1267
|
+
* @param value - The string to format.
|
|
1268
|
+
*
|
|
1279
1269
|
* @returns The formatted string.
|
|
1280
1270
|
*/
|
|
1281
|
-
static stringGetRegularExpressionValidated(
|
|
1271
|
+
static stringGetRegularExpressionValidated(this: void, value: string): string;
|
|
1282
1272
|
/**
|
|
1283
1273
|
* Interprets given content string as date time.
|
|
1284
1274
|
* @param value - Date time string to interpret.
|
|
1285
1275
|
* @param interpretAsUTC - Identifies if given date should be interpret as
|
|
1286
1276
|
* utc.
|
|
1277
|
+
*
|
|
1287
1278
|
* @returns Interpret date time object.
|
|
1288
1279
|
*/
|
|
1289
|
-
static stringInterpretDateTime(value: string, interpretAsUTC?: boolean): Date | null;
|
|
1280
|
+
static stringInterpretDateTime(this: void, value: string, interpretAsUTC?: boolean): Date | null;
|
|
1290
1281
|
/**
|
|
1291
1282
|
* Converts a string to its lower case representation.
|
|
1292
1283
|
* @param string - The string to format.
|
|
1284
|
+
*
|
|
1293
1285
|
* @returns The formatted string.
|
|
1294
1286
|
*/
|
|
1295
|
-
static stringLowerCase(string: string): string;
|
|
1287
|
+
static stringLowerCase(this: void, string: string): string;
|
|
1296
1288
|
/**
|
|
1297
1289
|
* Wraps given mark strings in given target with given marker.
|
|
1298
|
-
*
|
|
1299
1290
|
* @param target - String to search for marker.
|
|
1300
1291
|
* @param words - String or array of strings to search in target for.
|
|
1301
1292
|
* @param normalizer - Pure normalisation function to use before searching
|
|
@@ -1304,37 +1295,34 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1304
1295
|
*
|
|
1305
1296
|
* @returns Processed result.
|
|
1306
1297
|
*/
|
|
1307
|
-
static stringMark(target: unknown, givenWords?: Array<string> | string, normalizer?:
|
|
1298
|
+
static stringMark(this: void, target: unknown, givenWords?: Array<string> | string, normalizer?: AnyFunction, marker?: string): unknown;
|
|
1308
1299
|
/**
|
|
1309
1300
|
* Implements the md5 hash algorithm.
|
|
1310
|
-
*
|
|
1311
1301
|
* @param value - Value to calculate md5 hash for.
|
|
1312
1302
|
* @param onlyAscii - Set to true if given input has ascii characters only
|
|
1313
1303
|
* to get more performance.
|
|
1314
1304
|
*
|
|
1315
1305
|
* @returns Calculated md5 hash value.
|
|
1316
1306
|
*/
|
|
1317
|
-
static stringMD5(value: string, onlyAscii?: boolean): string;
|
|
1307
|
+
static stringMD5(this: void, value: string, onlyAscii?: boolean): string;
|
|
1318
1308
|
/**
|
|
1319
1309
|
* Normalizes given phone number for automatic dialing or comparison.
|
|
1320
|
-
*
|
|
1321
1310
|
* @param value - Number to normalize.
|
|
1322
1311
|
* @param dialable - Indicates whether the result should be dialed or
|
|
1323
1312
|
* represented as lossless data.
|
|
1324
1313
|
*
|
|
1325
1314
|
* @returns Normalized number.
|
|
1326
1315
|
*/
|
|
1327
|
-
static stringNormalizePhoneNumber(value: unknown, dialable?: boolean): string;
|
|
1316
|
+
static stringNormalizePhoneNumber(this: void, value: unknown, dialable?: boolean): string;
|
|
1328
1317
|
/**
|
|
1329
1318
|
* Normalizes given zip code for automatic address processing.
|
|
1330
1319
|
* @param value - Number to normalize.
|
|
1331
1320
|
* @returns Normalized number.
|
|
1332
1321
|
*/
|
|
1333
|
-
static stringNormalizeZipCode(value: unknown): string;
|
|
1322
|
+
static stringNormalizeZipCode(this: void, value: unknown): string;
|
|
1334
1323
|
/**
|
|
1335
1324
|
* Converts given serialized, base64 encoded or file path given object into
|
|
1336
1325
|
* a native javaScript one if possible.
|
|
1337
|
-
*
|
|
1338
1326
|
* @param serializedObject - Object as string.
|
|
1339
1327
|
* @param scope - An optional scope which will be used to evaluate given
|
|
1340
1328
|
* object in.
|
|
@@ -1342,58 +1330,62 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1342
1330
|
*
|
|
1343
1331
|
* @returns The parsed object if possible and null otherwise.
|
|
1344
1332
|
*/
|
|
1345
|
-
static stringParseEncodedObject<T = PlainObject>(serializedObject: string, scope?: object, name?: string): null | T;
|
|
1333
|
+
static stringParseEncodedObject<T = PlainObject>(this: void, serializedObject: string, scope?: object, name?: string): null | T;
|
|
1346
1334
|
/**
|
|
1347
1335
|
* Represents given phone number. NOTE: Currently only support german phone
|
|
1348
1336
|
* numbers.
|
|
1349
1337
|
* @param value - Number to format.
|
|
1338
|
+
*
|
|
1350
1339
|
* @returns Formatted number.
|
|
1351
1340
|
*/
|
|
1352
|
-
static stringRepresentPhoneNumber(value: unknown): string;
|
|
1341
|
+
static stringRepresentPhoneNumber(this: void, value: unknown): string;
|
|
1353
1342
|
/**
|
|
1354
1343
|
* Slices all none numbers but preserves last separator.
|
|
1355
1344
|
* @param value - String to process.
|
|
1345
|
+
*
|
|
1356
1346
|
* @returns - Sliced given value.
|
|
1357
1347
|
*/
|
|
1358
|
-
static stringSliceAllExceptNumberAndLastSeperator(value: string): string;
|
|
1348
|
+
static stringSliceAllExceptNumberAndLastSeperator(this: void, value: string): string;
|
|
1359
1349
|
/**
|
|
1360
1350
|
* Slice weekday from given date representation.
|
|
1361
1351
|
* @param value - String to process.
|
|
1352
|
+
*
|
|
1362
1353
|
* @returns Sliced given string.
|
|
1363
1354
|
*/
|
|
1364
|
-
static stringSliceWeekday(value: string): string;
|
|
1355
|
+
static stringSliceWeekday(this: void, value: string): string;
|
|
1365
1356
|
/**
|
|
1366
1357
|
* Converts a dom selector to a prefixed dom selector string.
|
|
1367
1358
|
* @param selector - A dom node selector.
|
|
1359
|
+
*
|
|
1368
1360
|
* @returns Returns given selector prefixed.
|
|
1369
1361
|
*/
|
|
1370
1362
|
stringNormalizeDomNodeSelector: (selector: string) => string;
|
|
1371
1363
|
/**
|
|
1372
1364
|
* Determines corresponding utc timestamp for given date object.
|
|
1373
|
-
*
|
|
1374
1365
|
* @param value - Date to convert.
|
|
1375
1366
|
* @param inMilliseconds - Indicates whether given number should be in
|
|
1376
1367
|
* seconds (default) or milliseconds.
|
|
1377
1368
|
*
|
|
1378
1369
|
* @returns Determined numerous value.
|
|
1379
1370
|
*/
|
|
1380
|
-
static numberGetUTCTimestamp(value?: Date | null | number | string, inMilliseconds?: boolean): number;
|
|
1371
|
+
static numberGetUTCTimestamp(this: void, value?: Date | null | number | string, inMilliseconds?: boolean): number;
|
|
1381
1372
|
/**
|
|
1382
1373
|
* Checks if given object is java scripts native "Number.NaN" object.
|
|
1383
1374
|
* @param value - Value to check.
|
|
1375
|
+
*
|
|
1384
1376
|
* @returns Returns whether given value is not a number or not.
|
|
1385
1377
|
*/
|
|
1386
|
-
static numberIsNotANumber(value: unknown): boolean;
|
|
1378
|
+
static numberIsNotANumber(this: void, value: unknown): boolean;
|
|
1387
1379
|
/**
|
|
1388
1380
|
* Rounds a given number accurate to given number of digits.
|
|
1389
1381
|
* @param number - The number to round.
|
|
1390
1382
|
* @param digits - The number of digits after comma.
|
|
1383
|
+
*
|
|
1391
1384
|
* @returns Returns the rounded number.
|
|
1392
1385
|
*/
|
|
1393
|
-
static numberRound(number: number, digits?: number): number;
|
|
1386
|
+
static numberRound(this: void, number: number, digits?: number): number;
|
|
1394
1387
|
/**
|
|
1395
1388
|
* Checks if given url response with given status code.
|
|
1396
|
-
*
|
|
1397
1389
|
* @param url - Url to check reachability.
|
|
1398
1390
|
* @param givenOptions - Options to configure check:
|
|
1399
1391
|
*
|
|
@@ -1416,10 +1408,9 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1416
1408
|
* finished and resulting status code matches given expected status code.
|
|
1417
1409
|
* Otherwise returned promise will be rejected.
|
|
1418
1410
|
*/
|
|
1419
|
-
static checkReachability(url: string, givenOptions?: RecursivePartial<CheckReachabilityOptions>): ReturnType<typeof fetch>;
|
|
1411
|
+
static checkReachability(this: void, url: string, givenOptions?: RecursivePartial<CheckReachabilityOptions>): ReturnType<typeof fetch>;
|
|
1420
1412
|
/**
|
|
1421
1413
|
* Checks if given url isn't reachable.
|
|
1422
|
-
*
|
|
1423
1414
|
* @param url - Url to check reachability.
|
|
1424
1415
|
* @param givenOptions - Options to configure check:
|
|
1425
1416
|
*
|
|
@@ -1441,10 +1432,9 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1441
1432
|
* resolving when final timeout is reached or the endpoint is unreachable
|
|
1442
1433
|
* (after some tries).
|
|
1443
1434
|
*/
|
|
1444
|
-
static checkUnreachability(url: string, givenOptions?: RecursivePartial<CheckReachabilityOptions>): Promise<Error | null | Promise<Error | null>>;
|
|
1435
|
+
static checkUnreachability(this: void, url: string, givenOptions?: RecursivePartial<CheckReachabilityOptions>): Promise<Error | null | Promise<Error | null>>;
|
|
1445
1436
|
/**
|
|
1446
1437
|
* Send given data to a given iframe.
|
|
1447
|
-
*
|
|
1448
1438
|
* @param target - Name of the target iframe or the target iframe itself.
|
|
1449
1439
|
* @param url - URL to send to data to.
|
|
1450
1440
|
* @param data - Data holding object to send data to.
|
|
@@ -1456,10 +1446,9 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1456
1446
|
*
|
|
1457
1447
|
* @returns Returns the given target as extended dom node.
|
|
1458
1448
|
*/
|
|
1459
|
-
static sendToIFrame(target: $DomNode | HTMLIFrameElement | string, url: string, data: Mapping<unknown>, requestType?: string, removeAfterLoad?: boolean): $DomNode;
|
|
1449
|
+
static sendToIFrame(this: void, target: $DomNode | HTMLIFrameElement | string, url: string, data: Mapping<unknown>, requestType?: string, removeAfterLoad?: boolean): $DomNode;
|
|
1460
1450
|
/**
|
|
1461
1451
|
* Send given data to a temporary created iframe.
|
|
1462
|
-
*
|
|
1463
1452
|
* @param url - URL to send to data to.
|
|
1464
1453
|
* @param data - Data holding object to send data to.
|
|
1465
1454
|
* @param requestType - The forms action attribute value. If nothing is
|
|
@@ -1474,7 +1463,6 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1474
1463
|
* Copies given source directory via path to given target directory
|
|
1475
1464
|
* location with same target name as source file has or copy to given
|
|
1476
1465
|
* complete target directory path.
|
|
1477
|
-
*
|
|
1478
1466
|
* @param sourcePath - Path to directory to copy.
|
|
1479
1467
|
* @param targetPath - Target directory or complete directory location to
|
|
1480
1468
|
* copy in.
|
|
@@ -1484,12 +1472,11 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1484
1472
|
*
|
|
1485
1473
|
* @returns Promise holding the determined target directory path.
|
|
1486
1474
|
*/
|
|
1487
|
-
static copyDirectoryRecursive(sourcePath: string, targetPath: string, callback?:
|
|
1475
|
+
static copyDirectoryRecursive(this: void, sourcePath: string, targetPath: string, callback?: AnyFunction, readOptions?: PlainObject, writeOptions?: PlainObject): Promise<string>;
|
|
1488
1476
|
/**
|
|
1489
1477
|
* Copies given source directory via path to given target directory
|
|
1490
1478
|
* location with same target name as source file has or copy to given
|
|
1491
1479
|
* complete target directory path.
|
|
1492
|
-
*
|
|
1493
1480
|
* @param sourcePath - Path to directory to copy.
|
|
1494
1481
|
* @param targetPath - Target directory or complete directory location to
|
|
1495
1482
|
* copy in.
|
|
@@ -1499,12 +1486,11 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1499
1486
|
*
|
|
1500
1487
|
* @returns Determined target directory path.
|
|
1501
1488
|
*/
|
|
1502
|
-
static copyDirectoryRecursiveSync(sourcePath: string, targetPath: string, callback?:
|
|
1489
|
+
static copyDirectoryRecursiveSync(this: void, sourcePath: string, targetPath: string, callback?: AnyFunction, readOptions?: PlainObject, writeOptions?: PlainObject): string;
|
|
1503
1490
|
/**
|
|
1504
1491
|
* Copies given source file via path to given target directory location
|
|
1505
1492
|
* with same target name as source file has or copy to given complete
|
|
1506
1493
|
* target file path.
|
|
1507
|
-
*
|
|
1508
1494
|
* @param sourcePath - Path to file to copy.
|
|
1509
1495
|
* @param targetPath - Target directory or complete file location to copy
|
|
1510
1496
|
* to.
|
|
@@ -1513,12 +1499,11 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1513
1499
|
*
|
|
1514
1500
|
* @returns Determined target file path.
|
|
1515
1501
|
*/
|
|
1516
|
-
static copyFile(sourcePath: string, targetPath: string, readOptions?: PlainObject, writeOptions?: PlainObject): Promise<string>;
|
|
1502
|
+
static copyFile(this: void, sourcePath: string, targetPath: string, readOptions?: PlainObject, writeOptions?: PlainObject): Promise<string>;
|
|
1517
1503
|
/**
|
|
1518
1504
|
* Copies given source file via path to given target directory location
|
|
1519
1505
|
* with same target name as source file has or copy to given complete
|
|
1520
1506
|
* target file path.
|
|
1521
|
-
*
|
|
1522
1507
|
* @param sourcePath - Path to file to copy.
|
|
1523
1508
|
* @param targetPath - Target directory or complete file location to copy
|
|
1524
1509
|
* to.
|
|
@@ -1527,38 +1512,41 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1527
1512
|
*
|
|
1528
1513
|
* @returns Determined target file path.
|
|
1529
1514
|
*/
|
|
1530
|
-
static copyFileSync(sourcePath: string, targetPath: string, readOptions?: PlainObject, writeOptions?: PlainObject): string;
|
|
1515
|
+
static copyFileSync(this: void, sourcePath: string, targetPath: string, readOptions?: PlainObject, writeOptions?: PlainObject): string;
|
|
1531
1516
|
/**
|
|
1532
1517
|
* Checks if given path points to a valid directory.
|
|
1533
1518
|
* @param filePath - Path to directory.
|
|
1519
|
+
*
|
|
1534
1520
|
* @returns A promise holding a boolean which indicates directory
|
|
1535
1521
|
* existence.
|
|
1536
1522
|
*/
|
|
1537
|
-
static isDirectory(filePath: string): Promise<boolean>;
|
|
1523
|
+
static isDirectory(this: void, filePath: string): Promise<boolean>;
|
|
1538
1524
|
/**
|
|
1539
1525
|
* Checks if given path points to a valid directory.
|
|
1540
1526
|
* @param filePath - Path to directory.
|
|
1527
|
+
*
|
|
1541
1528
|
* @returns A boolean which indicates directory existents.
|
|
1542
1529
|
*/
|
|
1543
|
-
static isDirectorySync(filePath: string): boolean;
|
|
1530
|
+
static isDirectorySync(this: void, filePath: string): boolean;
|
|
1544
1531
|
/**
|
|
1545
1532
|
* Checks if given path points to a valid file.
|
|
1546
1533
|
* @param filePath - Path to directory.
|
|
1534
|
+
*
|
|
1547
1535
|
* @returns A promise holding a boolean which indicates directory
|
|
1548
1536
|
* existence.
|
|
1549
1537
|
*/
|
|
1550
|
-
static isFile(filePath: string): Promise<boolean>;
|
|
1538
|
+
static isFile(this: void, filePath: string): Promise<boolean>;
|
|
1551
1539
|
/**
|
|
1552
1540
|
* Checks if given path points to a valid file.
|
|
1553
1541
|
* @param filePath - Path to file.
|
|
1542
|
+
*
|
|
1554
1543
|
* @returns A boolean which indicates file existence.
|
|
1555
1544
|
*/
|
|
1556
|
-
static isFileSync(filePath: string): boolean;
|
|
1545
|
+
static isFileSync(this: void, filePath: string): boolean;
|
|
1557
1546
|
/**
|
|
1558
1547
|
* Iterates through given directory structure recursively and calls given
|
|
1559
1548
|
* callback for each found file. Callback gets file path and corresponding
|
|
1560
1549
|
* stat object as argument.
|
|
1561
|
-
*
|
|
1562
1550
|
* @param directoryPath - Path to directory structure to traverse.
|
|
1563
1551
|
* @param callback - Function to invoke for each traversed file and
|
|
1564
1552
|
* potentially manipulate further traversing.
|
|
@@ -1566,26 +1554,24 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1566
1554
|
*
|
|
1567
1555
|
* @returns A promise holding the determined files.
|
|
1568
1556
|
*/
|
|
1569
|
-
static walkDirectoryRecursively(directoryPath: string, callback?:
|
|
1557
|
+
static walkDirectoryRecursively(this: void, directoryPath: string, callback?: AnyFunction | null, options?: Encoding | SecondParameter<typeof import('fs').readdir>): Promise<Array<File>>;
|
|
1570
1558
|
/**
|
|
1571
1559
|
* Iterates through given directory structure recursively and calls given
|
|
1572
1560
|
* callback for each found file. Callback gets file path and corresponding
|
|
1573
1561
|
* stats object as argument.
|
|
1574
|
-
*
|
|
1575
1562
|
* @param directoryPath - Path to directory structure to traverse.
|
|
1576
1563
|
* @param callback - Function to invoke for each traversed file.
|
|
1577
1564
|
* @param options - Options to use for nested "readdir" calls.
|
|
1578
1565
|
*
|
|
1579
1566
|
* @returns Determined list if all files.
|
|
1580
1567
|
*/
|
|
1581
|
-
static walkDirectoryRecursivelySync(directoryPath: string, callback?:
|
|
1568
|
+
static walkDirectoryRecursivelySync(this: void, directoryPath: string, callback?: AnyFunction | null, options?: Encoding | SecondParameter<typeof import('fs').readdirSync>): Array<File>;
|
|
1582
1569
|
/**
|
|
1583
1570
|
* Generates a one shot close handler which triggers given promise methods.
|
|
1584
1571
|
* If a reason is provided it will be given as resolve target. An Error
|
|
1585
1572
|
* will be generated if return code is not zero. The generated Error has
|
|
1586
1573
|
* a property "returnCode" which provides corresponding process return
|
|
1587
1574
|
* code.
|
|
1588
|
-
*
|
|
1589
1575
|
* @param resolve - Promise's resolve function.
|
|
1590
1576
|
* @param reject - Promise's reject function.
|
|
1591
1577
|
* @param reason - Promise target if process has a zero return code.
|
|
@@ -1594,18 +1580,18 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1594
1580
|
*
|
|
1595
1581
|
* @returns Process close handler function.
|
|
1596
1582
|
*/
|
|
1597
|
-
static getProcessCloseHandler(resolve: ProcessCloseCallback, reject: ProcessErrorCallback, reason?: unknown, callback?:
|
|
1583
|
+
static getProcessCloseHandler(this: void, resolve: ProcessCloseCallback, reject: ProcessErrorCallback, reason?: unknown, callback?: AnyFunction): ProcessHandler;
|
|
1598
1584
|
/**
|
|
1599
1585
|
* Forwards given child process communication channels to corresponding
|
|
1600
1586
|
* current process communication channels.
|
|
1601
1587
|
* @param childProcess - Child process meta data.
|
|
1588
|
+
*
|
|
1602
1589
|
* @returns Given child process meta data.
|
|
1603
1590
|
*/
|
|
1604
|
-
static handleChildProcess(childProcess: ChildProcess): ChildProcess;
|
|
1591
|
+
static handleChildProcess(this: void, childProcess: ChildProcess): ChildProcess;
|
|
1605
1592
|
/**
|
|
1606
1593
|
* Helper method for attach/remove event handler methods.
|
|
1607
|
-
*
|
|
1608
|
-
* @param parameter - Arguments object given to methods like "on()" or
|
|
1594
|
+
* @param parameters - Arguments object given to methods like "on()" or
|
|
1609
1595
|
* "off()".
|
|
1610
1596
|
* @param removeEvent - Indicates if handler should be attached or removed.
|
|
1611
1597
|
* @param eventFunctionName - Name of function to wrap.
|
|
@@ -1614,6 +1600,9 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1614
1600
|
*/
|
|
1615
1601
|
_bindEventHelper: <TElement_1 = HTMLElement>(parameters: Array<unknown>, removeEvent?: boolean, eventFunctionName?: string | undefined) => $DomNode<TElement_1>;
|
|
1616
1602
|
}
|
|
1603
|
+
/**
|
|
1604
|
+
* Dom bound version of Tools class.
|
|
1605
|
+
*/
|
|
1617
1606
|
export declare class BoundTools<TElement extends HTMLElement = HTMLElement, LockType = string | void> extends Tools<TElement, LockType> {
|
|
1618
1607
|
$domNode: $DomNode<TElement>;
|
|
1619
1608
|
readonly self: typeof BoundTools;
|
|
@@ -1625,7 +1614,6 @@ export declare class BoundTools<TElement extends HTMLElement = HTMLElement, Lock
|
|
|
1625
1614
|
* this plugin name suffix ("tools"). You don't have to use "{1}" but it
|
|
1626
1615
|
* can help you to write code which is more reconcilable with the dry
|
|
1627
1616
|
* concept.
|
|
1628
|
-
*
|
|
1629
1617
|
* @param $domNode - $-extended dom node to use as reference in various
|
|
1630
1618
|
* methods.
|
|
1631
1619
|
* @param additionalParameters - Additional parameters to call super method
|
|
@@ -1636,4 +1624,4 @@ export declare class BoundTools<TElement extends HTMLElement = HTMLElement, Lock
|
|
|
1636
1624
|
constructor($domNode: $DomNode<TElement>, ...additionalParameters: ParametersExceptFirst<Tools['constructor']>);
|
|
1637
1625
|
}
|
|
1638
1626
|
export default Tools;
|
|
1639
|
-
export declare const augment$: (value: $
|
|
1627
|
+
export declare const augment$: (value: $TStatic) => void;
|