clientnode 3.0.1061 → 3.0.1063

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