clientnode 3.0.837 → 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 +169 -122
- package/index.js +1 -1
- package/package.json +1 -1
- package/property-types.js +1 -1
- package/testHelper.js +1 -1
- package/type.d.ts +9 -8
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, 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';
|
|
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;
|
|
@@ -149,7 +149,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
149
149
|
*
|
|
150
150
|
* @returns Formatted date time string.
|
|
151
151
|
*/
|
|
152
|
-
static dateTimeFormat(format?: string, dateTime?: Date, options?: SecondParameter<typeof Intl.DateTimeFormat>, locales?: Array<string> | string): string;
|
|
152
|
+
static dateTimeFormat(this: void, format?: string, dateTime?: Date, options?: SecondParameter<typeof Intl.DateTimeFormat>, locales?: Array<string> | string): string;
|
|
153
153
|
/**
|
|
154
154
|
* Defines a generic controller for dom node aware plugins.
|
|
155
155
|
* @param object - The object or class to control. If "object" is a class
|
|
@@ -159,7 +159,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
159
159
|
*
|
|
160
160
|
* @returns Returns whatever the initializer method returns.
|
|
161
161
|
*/
|
|
162
|
-
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;
|
|
163
163
|
/**
|
|
164
164
|
* Calling this method introduces a starting point for a critical area with
|
|
165
165
|
* potential race conditions. The area will be binded to given description
|
|
@@ -190,75 +190,84 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
190
190
|
*
|
|
191
191
|
* @returns The requested semaphore instance.
|
|
192
192
|
*/
|
|
193
|
-
static getSemaphore(numberOfResources?: number): Semaphore;
|
|
193
|
+
static getSemaphore(this: void, numberOfResources?: number): Semaphore;
|
|
194
194
|
/**
|
|
195
195
|
* Determines whether its argument represents a JavaScript number.
|
|
196
196
|
* @param value - Value to analyze.
|
|
197
|
+
*
|
|
197
198
|
* @returns A boolean value indicating whether given object is numeric
|
|
198
199
|
* like.
|
|
199
200
|
*/
|
|
200
|
-
static isNumeric(value: unknown): value is number;
|
|
201
|
+
static isNumeric(this: void, value: unknown): value is number;
|
|
201
202
|
/**
|
|
202
203
|
* Determine whether the argument is a window.
|
|
203
204
|
* @param value - Value to check for.
|
|
205
|
+
*
|
|
204
206
|
* @returns Boolean value indicating the result.
|
|
205
207
|
*/
|
|
206
|
-
static isWindow(value: unknown): value is Window;
|
|
208
|
+
static isWindow(this: void, value: unknown): value is Window;
|
|
207
209
|
/**
|
|
208
210
|
* Checks if given object is similar to an array and can be handled like an
|
|
209
211
|
* array.
|
|
210
212
|
* @param object - Object to check behavior for.
|
|
213
|
+
*
|
|
211
214
|
* @returns A boolean value indicating whether given object is array like.
|
|
212
215
|
*/
|
|
213
|
-
static isArrayLike(object: unknown): boolean;
|
|
216
|
+
static isArrayLike(this: void, object: unknown): boolean;
|
|
214
217
|
/**
|
|
215
218
|
* Checks whether one of the given pattern matches given string.
|
|
216
219
|
* @param target - Target to check in pattern for.
|
|
217
220
|
* @param pattern - List of pattern to check for.
|
|
218
|
-
* @returns Value "true" if given object is matches by at leas one of the
|
|
219
221
|
*
|
|
222
|
+
* @returns Value "true" if given object is matches by at leas one of the
|
|
220
223
|
* given pattern and "false" otherwise.
|
|
221
224
|
*/
|
|
222
|
-
static isAnyMatching(target: string, pattern: Array<string | RegExp>): boolean;
|
|
225
|
+
static isAnyMatching(this: void, target: string, pattern: Array<string | RegExp>): boolean;
|
|
223
226
|
/**
|
|
224
227
|
* Checks whether given object is a native object but not null.
|
|
225
228
|
* @param value - Value to check.
|
|
229
|
+
*
|
|
226
230
|
* @returns Value "true" if given object is a plain javaScript object and
|
|
227
231
|
* "false" otherwise.
|
|
228
232
|
*/
|
|
229
|
-
static isObject(value: unknown): value is object;
|
|
233
|
+
static isObject(this: void, value: unknown): value is object;
|
|
230
234
|
/**
|
|
231
235
|
* Checks whether given object is a plain native object.
|
|
232
236
|
* @param value - Value to check.
|
|
237
|
+
*
|
|
233
238
|
* @returns Value "true" if given object is a plain javaScript object and
|
|
234
239
|
* "false" otherwise.
|
|
235
240
|
*/
|
|
236
|
-
static isPlainObject(value: unknown): value is PlainObject;
|
|
241
|
+
static isPlainObject(this: void, value: unknown): value is PlainObject;
|
|
237
242
|
/**
|
|
238
243
|
* Checks whether given object is a set.
|
|
239
244
|
* @param value - Value to check.
|
|
245
|
+
*
|
|
240
246
|
* @returns Value "true" if given object is a set and "false" otherwise.
|
|
241
247
|
*/
|
|
242
|
-
static isSet(value: unknown): value is Set<unknown>;
|
|
248
|
+
static isSet(this: void, value: unknown): value is Set<unknown>;
|
|
243
249
|
/**
|
|
244
250
|
* Checks whether given object is a map.
|
|
245
251
|
* @param value - Value to check.
|
|
252
|
+
*
|
|
246
253
|
* @returns Value "true" if given object is a map and "false" otherwise.
|
|
247
254
|
*/
|
|
248
|
-
static isMap(value: unknown): value is Map<unknown, unknown>;
|
|
255
|
+
static isMap(this: void, value: unknown): value is Map<unknown, unknown>;
|
|
249
256
|
/**
|
|
250
257
|
* Checks whether given object is a proxy.
|
|
251
258
|
* @param value - Value to check.
|
|
259
|
+
*
|
|
252
260
|
* @returns Value "true" if given object is a proxy and "false" otherwise.
|
|
253
261
|
*/
|
|
254
|
-
static isProxy(value: unknown): value is ProxyType;
|
|
262
|
+
static isProxy(this: void, value: unknown): value is ProxyType;
|
|
255
263
|
/**
|
|
256
264
|
* Checks whether given object is a function.
|
|
257
265
|
* @param value - Value to check.
|
|
266
|
+
*
|
|
258
267
|
* @returns Value "true" if given object is a function and "false"
|
|
259
268
|
* otherwise.
|
|
260
269
|
*/
|
|
261
|
-
static isFunction(value: unknown): value is AnyFunction;
|
|
270
|
+
static isFunction(this: void, value: unknown): value is AnyFunction;
|
|
262
271
|
/**
|
|
263
272
|
* Shows the given object's representation in the browsers console if
|
|
264
273
|
* possible or in a standalone alert-window as fallback.
|
|
@@ -334,20 +343,21 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
334
343
|
*
|
|
335
344
|
* @returns Returns the serialized version of given object.
|
|
336
345
|
*/
|
|
337
|
-
static show(object: unknown, level?: number, currentLevel?: number): string;
|
|
346
|
+
static show(this: void, object: unknown, level?: number, currentLevel?: number): string;
|
|
338
347
|
/**
|
|
339
348
|
* Deletes a cookie value by given name.
|
|
340
349
|
* @param name - Name to identify requested value.
|
|
350
|
+
*
|
|
341
351
|
* @returns Nothing.
|
|
342
352
|
*/
|
|
343
|
-
static deleteCookie(name: string): void;
|
|
353
|
+
static deleteCookie(this: void, name: string): void;
|
|
344
354
|
/**
|
|
345
355
|
* Gets a cookie value by given name.
|
|
346
356
|
* @param name - Name to identify requested value.
|
|
347
357
|
*
|
|
348
358
|
* @returns Requested value.
|
|
349
359
|
*/
|
|
350
|
-
static getCookie(name: string): string | null;
|
|
360
|
+
static getCookie(this: void, name: string): string | null;
|
|
351
361
|
/**
|
|
352
362
|
* Sets a cookie key-value-pair.
|
|
353
363
|
* @param name - Name to identify given value.
|
|
@@ -364,7 +374,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
364
374
|
*
|
|
365
375
|
* @returns A boolean indicating whether cookie could be set or not.
|
|
366
376
|
*/
|
|
367
|
-
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;
|
|
368
378
|
/**
|
|
369
379
|
* Normalizes class name order of current dom node.
|
|
370
380
|
*
|
|
@@ -397,7 +407,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
397
407
|
*
|
|
398
408
|
* @returns Returns true if both dom representations are equivalent.
|
|
399
409
|
*/
|
|
400
|
-
static isEquivalentDOM(first: Node | string | $DomNode<Node>, second: Node | string | $DomNode<Node>, forceHTMLString?: boolean): boolean;
|
|
410
|
+
static isEquivalentDOM(this: void, first: Node | string | $DomNode<Node>, second: Node | string | $DomNode<Node>, forceHTMLString?: boolean): boolean;
|
|
401
411
|
/**
|
|
402
412
|
* Determines where current dom node is relative to current view port
|
|
403
413
|
* position.
|
|
@@ -415,9 +425,10 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
415
425
|
/**
|
|
416
426
|
* Generates a directive name corresponding selector string.
|
|
417
427
|
* @param directiveName - The directive name.
|
|
428
|
+
*
|
|
418
429
|
* @returns Returns generated selector.
|
|
419
430
|
*/
|
|
420
|
-
static generateDirectiveSelector(directiveName: string): string;
|
|
431
|
+
static generateDirectiveSelector(this: void, directiveName: string): string;
|
|
421
432
|
/**
|
|
422
433
|
* Removes a directive name corresponding class or attribute.
|
|
423
434
|
* @param directiveName - The directive name.
|
|
@@ -433,12 +444,14 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
433
444
|
/**
|
|
434
445
|
* Determines a normalized camel case directive name representation.
|
|
435
446
|
* @param directiveName - The directive name.
|
|
447
|
+
*
|
|
436
448
|
* @returns Returns the corresponding name.
|
|
437
449
|
*/
|
|
438
|
-
static getNormalizedDirectiveName(directiveName: string): string;
|
|
450
|
+
static getNormalizedDirectiveName(this: void, directiveName: string): string;
|
|
439
451
|
/**
|
|
440
452
|
* Determines a directive attribute value.
|
|
441
453
|
* @param directiveName - The directive name.
|
|
454
|
+
*
|
|
442
455
|
* @returns Returns the corresponding attribute value or "null" if no
|
|
443
456
|
* attribute value exists.
|
|
444
457
|
*/
|
|
@@ -454,6 +467,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
454
467
|
* Determines the dom node name of a given dom node string.
|
|
455
468
|
* @param domNodeSelector - A given to dom node selector to determine its
|
|
456
469
|
* name.
|
|
470
|
+
*
|
|
457
471
|
* @returns Returns The dom node name.
|
|
458
472
|
* @example
|
|
459
473
|
* // returns 'div'
|
|
@@ -465,7 +479,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
465
479
|
* // returns 'br'
|
|
466
480
|
* $.Tools.getDomNodeName('<br/>')
|
|
467
481
|
*/
|
|
468
|
-
static getDomNodeName(domNodeSelector: string): null | string;
|
|
482
|
+
static getDomNodeName(this: void, domNodeSelector: string): null | string;
|
|
469
483
|
/**
|
|
470
484
|
* Converts an object of dom selectors to an array of $ wrapped dom nodes.
|
|
471
485
|
* Note if selector description as one of "class" or "id" as suffix element
|
|
@@ -486,7 +500,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
486
500
|
*
|
|
487
501
|
* @returns The isolated scope.
|
|
488
502
|
*/
|
|
489
|
-
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;
|
|
490
504
|
/**
|
|
491
505
|
* Generates a unique name in given scope (useful for jsonp requests).
|
|
492
506
|
* @param prefix - A prefix which will be prepended to unique name.
|
|
@@ -496,26 +510,29 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
496
510
|
*
|
|
497
511
|
* @returns The function name.
|
|
498
512
|
*/
|
|
499
|
-
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;
|
|
500
514
|
/**
|
|
501
515
|
* Determines all parameter names from given callable (function or class,
|
|
502
516
|
* ...).
|
|
503
517
|
* @param callable - Function or function code to inspect.
|
|
518
|
+
*
|
|
504
519
|
* @returns List of parameter names.
|
|
505
520
|
*/
|
|
506
|
-
static getParameterNames(callable: AnyFunction | string): Array<string>;
|
|
521
|
+
static getParameterNames(this: void, callable: AnyFunction | string): Array<string>;
|
|
507
522
|
/**
|
|
508
523
|
* Implements the identity function.
|
|
509
524
|
* @param value - A value to return.
|
|
525
|
+
*
|
|
510
526
|
* @returns Returns the given value.
|
|
511
527
|
*/
|
|
512
|
-
static identity<T>(value: T): T;
|
|
528
|
+
static identity<T>(this: void, value: T): T;
|
|
513
529
|
/**
|
|
514
530
|
* Inverted filter helper to inverse each given filter.
|
|
515
531
|
* @param filter - A function that filters an array.
|
|
532
|
+
*
|
|
516
533
|
* @returns The inverted filter.
|
|
517
534
|
*/
|
|
518
|
-
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;
|
|
519
536
|
/**
|
|
520
537
|
* Triggers given callback after given duration. Supports unlimited
|
|
521
538
|
* duration length and returns a promise which will be resolved after given
|
|
@@ -533,7 +550,7 @@ 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
|
|
@@ -546,7 +563,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
546
563
|
*
|
|
547
564
|
* @returns Returns the wrapped method.
|
|
548
565
|
*/
|
|
549
|
-
static debounce<T = unknown>(callback: AnyFunction, thresholdInMilliseconds?: number, ...additionalArguments: Array<unknown>): ((...parameters: Array<unknown>) => Promise<T>);
|
|
566
|
+
static debounce<T = unknown>(this: void, callback: AnyFunction, thresholdInMilliseconds?: number, ...additionalArguments: Array<unknown>): ((...parameters: Array<unknown>) => Promise<T>);
|
|
550
567
|
/**
|
|
551
568
|
* Searches for internal event handler methods and runs them by default. In
|
|
552
569
|
* addition this method searches for a given event method by the options
|
|
@@ -595,7 +612,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
595
612
|
*
|
|
596
613
|
* @returns Returns given object wrapped with a dynamic getter proxy.
|
|
597
614
|
*/
|
|
598
|
-
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;
|
|
599
616
|
/**
|
|
600
617
|
* Converts given object into its serialized json representation by
|
|
601
618
|
* replacing circular references with a given provided value.
|
|
@@ -610,7 +627,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
610
627
|
*
|
|
611
628
|
* @returns The formatted json string.
|
|
612
629
|
*/
|
|
613
|
-
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;
|
|
614
631
|
/**
|
|
615
632
|
* Converts given map and all nested found maps objects to corresponding
|
|
616
633
|
* object.
|
|
@@ -619,7 +636,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
619
636
|
*
|
|
620
637
|
* @returns Given map as object.
|
|
621
638
|
*/
|
|
622
|
-
static convertMapToPlainObject(object: unknown, deep?: boolean): unknown;
|
|
639
|
+
static convertMapToPlainObject(this: void, object: unknown, deep?: boolean): unknown;
|
|
623
640
|
/**
|
|
624
641
|
* Converts given plain object and all nested found objects to
|
|
625
642
|
* corresponding map.
|
|
@@ -628,7 +645,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
628
645
|
*
|
|
629
646
|
* @returns Given object as map.
|
|
630
647
|
*/
|
|
631
|
-
static convertPlainObjectToMap(object: unknown, deep?: boolean): unknown;
|
|
648
|
+
static convertPlainObjectToMap(this: void, object: unknown, deep?: boolean): unknown;
|
|
632
649
|
/**
|
|
633
650
|
* Replaces given pattern in each value in given object recursively with
|
|
634
651
|
* given string replacement.
|
|
@@ -638,7 +655,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
638
655
|
*
|
|
639
656
|
* @returns Converted object with replaced patterns.
|
|
640
657
|
*/
|
|
641
|
-
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;
|
|
642
659
|
/**
|
|
643
660
|
* Copies given object (of any type) into optionally given destination.
|
|
644
661
|
* @param source - Object to copy.
|
|
@@ -657,13 +674,14 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
657
674
|
*
|
|
658
675
|
* @returns Value "true" if both objects are equal and "false" otherwise.
|
|
659
676
|
*/
|
|
660
|
-
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;
|
|
661
678
|
/**
|
|
662
679
|
* Determine the internal JavaScript [[Class]] of an object.
|
|
663
680
|
* @param value - Value to analyze.
|
|
681
|
+
*
|
|
664
682
|
* @returns Name of determined type.
|
|
665
683
|
*/
|
|
666
|
-
static determineType(value?: unknown): string;
|
|
684
|
+
static determineType(this: void, value?: unknown): string;
|
|
667
685
|
/**
|
|
668
686
|
* Returns true if given items are equal for given property list. If
|
|
669
687
|
* property list isn't set all properties will be checked. All keys which
|
|
@@ -691,7 +709,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
691
709
|
* environment and binary data is given, then a promise wrapping the
|
|
692
710
|
* determined boolean values is returned.
|
|
693
711
|
*/
|
|
694
|
-
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;
|
|
695
713
|
/**
|
|
696
714
|
* Searches for nested mappings with given indicator key and resolves
|
|
697
715
|
* marked values. Additionally all objects are wrapped with a proxy to
|
|
@@ -706,14 +724,15 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
706
724
|
*
|
|
707
725
|
* @returns Evaluated given mapping.
|
|
708
726
|
*/
|
|
709
|
-
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;
|
|
710
728
|
/**
|
|
711
729
|
* Removes properties in objects where a dynamic indicator lives.
|
|
712
730
|
* @param data - Object to traverse recursively.
|
|
713
731
|
* @param expressionIndicators - Property key to remove.
|
|
732
|
+
*
|
|
714
733
|
* @returns Given object with removed properties.
|
|
715
734
|
*/
|
|
716
|
-
static removeKeysInEvaluation<T = PlainObject>(data: T, expressionIndicators?: Array<string>): T;
|
|
735
|
+
static removeKeysInEvaluation<T = PlainObject>(this: void, data: T, expressionIndicators?: Array<string>): T;
|
|
717
736
|
/**
|
|
718
737
|
* Extends given target object with given sources object. As target and
|
|
719
738
|
* sources many expandable types are allowed but target and sources have to
|
|
@@ -725,7 +744,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
725
744
|
*
|
|
726
745
|
* @returns Returns given target extended with all given sources.
|
|
727
746
|
*/
|
|
728
|
-
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;
|
|
729
748
|
/**
|
|
730
749
|
* Retrieves substructure in given object referenced by given selector
|
|
731
750
|
* path.
|
|
@@ -736,7 +755,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
736
755
|
*
|
|
737
756
|
* @returns Determined sub structure of given data or "undefined".
|
|
738
757
|
*/
|
|
739
|
-
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;
|
|
740
759
|
/**
|
|
741
760
|
* Generates a proxy handler which forwards all operations to given object
|
|
742
761
|
* as there wouldn't be a proxy.
|
|
@@ -746,7 +765,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
746
765
|
*
|
|
747
766
|
* @returns Determined proxy handler.
|
|
748
767
|
*/
|
|
749
|
-
static getProxyHandler<T = unknown>(target: T, methodNames?: Mapping): ProxyHandler<T>;
|
|
768
|
+
static getProxyHandler<T = unknown>(this: void, target: T, methodNames?: Mapping): ProxyHandler<T>;
|
|
750
769
|
/**
|
|
751
770
|
* Slices all properties from given object which does not match provided
|
|
752
771
|
* object mask. Items can be explicitly white listed via "include" mask
|
|
@@ -757,7 +776,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
757
776
|
* @returns Given but sliced object. If (nested) object will be modified a
|
|
758
777
|
* flat copy of that object will be returned.
|
|
759
778
|
*/
|
|
760
|
-
static mask<Type = object>(object: Type, mask: ObjectMaskConfiguration): RecursivePartial<Type>;
|
|
779
|
+
static mask<Type = object>(this: void, object: Type, mask: ObjectMaskConfiguration): RecursivePartial<Type>;
|
|
761
780
|
/**
|
|
762
781
|
* Modifies given target corresponding to given source and removes source
|
|
763
782
|
* modification infos.
|
|
@@ -780,7 +799,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
780
799
|
*
|
|
781
800
|
* @returns Given target modified with given source.
|
|
782
801
|
*/
|
|
783
|
-
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;
|
|
784
803
|
/**
|
|
785
804
|
* Interprets a date object from given artefact.
|
|
786
805
|
* @param value - To interpret.
|
|
@@ -790,14 +809,15 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
790
809
|
* @returns Interpreted date object or "null" if given value couldn't be
|
|
791
810
|
* interpret.
|
|
792
811
|
*/
|
|
793
|
-
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;
|
|
794
813
|
/**
|
|
795
814
|
* Removes given key from given object recursively.
|
|
796
815
|
* @param object - Object to process.
|
|
797
816
|
* @param keys - List of keys to remove.
|
|
817
|
+
*
|
|
798
818
|
* @returns Processed given object.
|
|
799
819
|
*/
|
|
800
|
-
static removeKeyPrefixes<T>(object: T, keys?: Array<string> | string): T;
|
|
820
|
+
static removeKeyPrefixes<T>(this: void, object: T, keys?: Array<string> | string): T;
|
|
801
821
|
/**
|
|
802
822
|
* Represents given object as formatted string.
|
|
803
823
|
* @param object - Object to represent.
|
|
@@ -811,13 +831,14 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
811
831
|
*
|
|
812
832
|
* @returns Representation string.
|
|
813
833
|
*/
|
|
814
|
-
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;
|
|
815
835
|
/**
|
|
816
836
|
* Sort given objects keys.
|
|
817
837
|
* @param object - Object which keys should be sorted.
|
|
838
|
+
*
|
|
818
839
|
* @returns Sorted list of given keys.
|
|
819
840
|
*/
|
|
820
|
-
static sort(object: unknown): Array<unknown>;
|
|
841
|
+
static sort(this: void, object: unknown): Array<unknown>;
|
|
821
842
|
/**
|
|
822
843
|
* Removes a proxy from given data structure recursively.
|
|
823
844
|
* @param object - Object to proxy.
|
|
@@ -826,7 +847,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
826
847
|
*
|
|
827
848
|
* @returns Returns given object unwrapped from a dynamic proxy.
|
|
828
849
|
*/
|
|
829
|
-
static unwrapProxy<T = unknown>(object: T, seenObjects?: Set<unknown>): T;
|
|
850
|
+
static unwrapProxy<T = unknown>(this: void, object: T, seenObjects?: Set<unknown>): T;
|
|
830
851
|
/**
|
|
831
852
|
* Summarizes given property of given item list.
|
|
832
853
|
* @param data - Array of objects with given property name.
|
|
@@ -835,7 +856,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
835
856
|
*
|
|
836
857
|
* @returns Aggregated value.
|
|
837
858
|
*/
|
|
838
|
-
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;
|
|
839
860
|
/**
|
|
840
861
|
* Deletes every item witch has only empty attributes for given property
|
|
841
862
|
* names. If given property names are empty each attribute will be
|
|
@@ -846,7 +867,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
846
867
|
*
|
|
847
868
|
* @returns Given data without empty items.
|
|
848
869
|
*/
|
|
849
|
-
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>;
|
|
850
871
|
/**
|
|
851
872
|
* Extracts all properties from all items wich occur in given property
|
|
852
873
|
* names.
|
|
@@ -855,7 +876,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
855
876
|
*
|
|
856
877
|
* @returns Data with sliced items.
|
|
857
878
|
*/
|
|
858
|
-
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>;
|
|
859
880
|
/**
|
|
860
881
|
* Extracts all values which matches given regular expression.
|
|
861
882
|
* @param data - Data to filter.
|
|
@@ -863,7 +884,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
863
884
|
*
|
|
864
885
|
* @returns Filtered data.
|
|
865
886
|
*/
|
|
866
|
-
static arrayExtractIfMatches(data: unknown, regularExpression: string | RegExp): Array<string>;
|
|
887
|
+
static arrayExtractIfMatches(this: void, data: unknown, regularExpression: string | RegExp): Array<string>;
|
|
867
888
|
/**
|
|
868
889
|
* Filters given data if given property is set or not.
|
|
869
890
|
* @param data - Data to filter.
|
|
@@ -872,7 +893,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
872
893
|
* @returns Given data without the items which doesn't have specified
|
|
873
894
|
* property.
|
|
874
895
|
*/
|
|
875
|
-
static arrayExtractIfPropertyExists<T = unknown>(data: unknown, propertyName: string): Array<T>;
|
|
896
|
+
static arrayExtractIfPropertyExists<T = unknown>(this: void, data: unknown, propertyName: string): Array<T>;
|
|
876
897
|
/**
|
|
877
898
|
* Extract given data where specified property value matches given
|
|
878
899
|
* patterns.
|
|
@@ -881,7 +902,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
881
902
|
*
|
|
882
903
|
* @returns Filtered data.
|
|
883
904
|
*/
|
|
884
|
-
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>;
|
|
885
906
|
/**
|
|
886
907
|
* Determines all objects which exists in "first" and in "second".
|
|
887
908
|
* Object key which will be compared are given by "keys". If an empty array
|
|
@@ -896,14 +917,14 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
896
917
|
*
|
|
897
918
|
* @returns Data which does exit in given initial data.
|
|
898
919
|
*/
|
|
899
|
-
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>;
|
|
900
921
|
/**
|
|
901
922
|
* Converts given object into an array.
|
|
902
923
|
* @param object - Target to convert.
|
|
903
924
|
*
|
|
904
925
|
* @returns Generated array.
|
|
905
926
|
*/
|
|
906
|
-
static arrayMake<T = unknown>(object: unknown): Array<T>;
|
|
927
|
+
static arrayMake<T = unknown>(this: void, object: unknown): Array<T>;
|
|
907
928
|
/**
|
|
908
929
|
* Creates a list of items within given range.
|
|
909
930
|
* @param range - Array of lower and upper bounds. If only one value is
|
|
@@ -912,16 +933,18 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
912
933
|
* numbers are provided given range will be returned.
|
|
913
934
|
* @param step - Space between two consecutive values.
|
|
914
935
|
* @param ignoreLastStep - Removes last step.
|
|
936
|
+
*
|
|
915
937
|
* @returns Produced array of integers.
|
|
916
938
|
*/
|
|
917
|
-
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>;
|
|
918
940
|
/**
|
|
919
941
|
* Merge the contents of two arrays together into the first array.
|
|
920
942
|
* @param target - Target array.
|
|
921
943
|
* @param source - Source array.
|
|
944
|
+
*
|
|
922
945
|
* @returns Target array with merged given source one.
|
|
923
946
|
*/
|
|
924
|
-
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>;
|
|
925
948
|
/**
|
|
926
949
|
* Generates a list if pagination symbols to render a pagination from.
|
|
927
950
|
* @param options - Configure bounds and current page of pagination to
|
|
@@ -945,13 +968,14 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
945
968
|
*
|
|
946
969
|
* @returns A list of pagination symbols.
|
|
947
970
|
*/
|
|
948
|
-
static arrayPaginate(options?: Partial<PaginateOptions>): Array<Page>;
|
|
971
|
+
static arrayPaginate(this: void, options?: Partial<PaginateOptions>): Array<Page>;
|
|
949
972
|
/**
|
|
950
973
|
* Generates all permutations of given iterable.
|
|
951
974
|
* @param data - Array like object.
|
|
975
|
+
*
|
|
952
976
|
* @returns Array of permuted arrays.
|
|
953
977
|
*/
|
|
954
|
-
static arrayPermutate<T = unknown>(data: Array<T>): Array<Array<T>>;
|
|
978
|
+
static arrayPermutate<T = unknown>(this: void, data: Array<T>): Array<Array<T>>;
|
|
955
979
|
/**
|
|
956
980
|
* Generates all lengths permutations of given iterable.
|
|
957
981
|
* @param data - Array like object.
|
|
@@ -960,14 +984,15 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
960
984
|
*
|
|
961
985
|
* @returns Array of permuted arrays.
|
|
962
986
|
*/
|
|
963
|
-
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>>;
|
|
964
988
|
/**
|
|
965
989
|
* Sums up given property of given item list.
|
|
966
990
|
* @param data - The objects with specified property to sum up.
|
|
967
991
|
* @param propertyName - Property name to sum up its value.
|
|
992
|
+
*
|
|
968
993
|
* @returns The aggregated value.
|
|
969
994
|
*/
|
|
970
|
-
static arraySumUpProperty(data: unknown, propertyName: string): number;
|
|
995
|
+
static arraySumUpProperty(this: void, data: unknown, propertyName: string): number;
|
|
971
996
|
/**
|
|
972
997
|
* Adds an item to another item as array connection (many to one).
|
|
973
998
|
* @param item - Item where the item should be appended to.
|
|
@@ -978,7 +1003,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
978
1003
|
*
|
|
979
1004
|
* @returns Item with the appended target.
|
|
980
1005
|
*/
|
|
981
|
-
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>;
|
|
982
1007
|
/**
|
|
983
1008
|
* Removes given target on given list.
|
|
984
1009
|
* @param list - Array to splice.
|
|
@@ -988,13 +1013,14 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
988
1013
|
*
|
|
989
1014
|
* @returns Item with the appended target.
|
|
990
1015
|
*/
|
|
991
|
-
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>;
|
|
992
1017
|
/**
|
|
993
1018
|
* Sorts given object of dependencies in a topological order.
|
|
994
1019
|
* @param items - Items to sort.
|
|
1020
|
+
*
|
|
995
1021
|
* @returns Sorted array of given items respecting their dependencies.
|
|
996
1022
|
*/
|
|
997
|
-
static arraySortTopological(items: Mapping<Array<string> | string>): Array<string>;
|
|
1023
|
+
static arraySortTopological(this: void, items: Mapping<Array<string> | string>): Array<string>;
|
|
998
1024
|
/**
|
|
999
1025
|
* Makes all values in given iterable unique by removing duplicates (The
|
|
1000
1026
|
* first occurrences will be left).
|
|
@@ -1002,7 +1028,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1002
1028
|
*
|
|
1003
1029
|
* @returns Sliced version of given object.
|
|
1004
1030
|
*/
|
|
1005
|
-
static arrayUnique<T = unknown>(data: Array<T>): Array<T>;
|
|
1031
|
+
static arrayUnique<T = unknown>(this: void, data: Array<T>): Array<T>;
|
|
1006
1032
|
/**
|
|
1007
1033
|
* Translates given string into the regular expression validated
|
|
1008
1034
|
* representation.
|
|
@@ -1011,7 +1037,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1011
1037
|
*
|
|
1012
1038
|
* @returns Converted string.
|
|
1013
1039
|
*/
|
|
1014
|
-
static stringEscapeRegularExpressions(value: string, excludeSymbols?: Array<string>): string;
|
|
1040
|
+
static stringEscapeRegularExpressions(this: void, value: string, excludeSymbols?: Array<string>): string;
|
|
1015
1041
|
/**
|
|
1016
1042
|
* Translates given name into a valid javaScript one. *
|
|
1017
1043
|
* @param name - Name to convert.
|
|
@@ -1020,7 +1046,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1020
1046
|
*
|
|
1021
1047
|
* @returns Converted name is returned.
|
|
1022
1048
|
*/
|
|
1023
|
-
static stringConvertToValidVariableName(name: string, allowedSymbols?: string): string;
|
|
1049
|
+
static stringConvertToValidVariableName(this: void, name: string, allowedSymbols?: string): string;
|
|
1024
1050
|
/**
|
|
1025
1051
|
* This method is intended for encoding *key* or *value* parts of query
|
|
1026
1052
|
* component. We need a custom method because "encodeURIComponent()" is too
|
|
@@ -1032,7 +1058,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1032
1058
|
*
|
|
1033
1059
|
* @returns Encoded given url.
|
|
1034
1060
|
*/
|
|
1035
|
-
static stringEncodeURIComponent(url: string, encodeSpaces?: boolean): string;
|
|
1061
|
+
static stringEncodeURIComponent(this: void, url: string, encodeSpaces?: boolean): string;
|
|
1036
1062
|
/**
|
|
1037
1063
|
* Appends a path selector to the given path if there isn't one yet.
|
|
1038
1064
|
* @param path - The path for appending a selector.
|
|
@@ -1040,7 +1066,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1040
1066
|
*
|
|
1041
1067
|
* @returns The appended path.
|
|
1042
1068
|
*/
|
|
1043
|
-
static stringAddSeparatorToPath(path: string, pathSeparator?: string): string;
|
|
1069
|
+
static stringAddSeparatorToPath(this: void, path: string, pathSeparator?: string): string;
|
|
1044
1070
|
/**
|
|
1045
1071
|
* Checks if given path has given path prefix.
|
|
1046
1072
|
* @param prefix - Path prefix to search for.
|
|
@@ -1050,7 +1076,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1050
1076
|
*
|
|
1051
1077
|
* @returns Value "true" if given prefix occur and "false" otherwise.
|
|
1052
1078
|
*/
|
|
1053
|
-
static stringHasPathPrefix(prefix?: unknown, path?: string, separator?: string): boolean;
|
|
1079
|
+
static stringHasPathPrefix(this: void, prefix?: unknown, path?: string, separator?: string): boolean;
|
|
1054
1080
|
/**
|
|
1055
1081
|
* Extracts domain name from given url. If no explicit domain name given
|
|
1056
1082
|
* current domain name will be assumed. If no parameter given current
|
|
@@ -1061,7 +1087,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1061
1087
|
*
|
|
1062
1088
|
* @returns Extracted domain.
|
|
1063
1089
|
*/
|
|
1064
|
-
static stringGetDomainName(url?: string, fallback?: string): string;
|
|
1090
|
+
static stringGetDomainName(this: void, url?: string, fallback?: string): string;
|
|
1065
1091
|
/**
|
|
1066
1092
|
* Extracts port number from given url. If no explicit port number given
|
|
1067
1093
|
* and no fallback is defined current port number will be assumed for local
|
|
@@ -1076,7 +1102,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1076
1102
|
*
|
|
1077
1103
|
* @returns Extracted port number.
|
|
1078
1104
|
*/
|
|
1079
|
-
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;
|
|
1080
1106
|
/**
|
|
1081
1107
|
* Extracts protocol name from given url. If no explicit url is given,
|
|
1082
1108
|
* current protocol will be assumed. If no parameter given current protocol
|
|
@@ -1087,7 +1113,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1087
1113
|
*
|
|
1088
1114
|
* @returns Extracted protocol.
|
|
1089
1115
|
*/
|
|
1090
|
-
static stringGetProtocolName(url?: string, fallback?: string): string;
|
|
1116
|
+
static stringGetProtocolName(this: void, url?: string, fallback?: string): string;
|
|
1091
1117
|
/**
|
|
1092
1118
|
* Read a page's GET URL variables and return them as an associative array
|
|
1093
1119
|
* and preserves ordering.
|
|
@@ -1115,7 +1141,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1115
1141
|
* @returns Returns the current get array or requested value. If requested
|
|
1116
1142
|
* key doesn't exist "undefined" is returned.
|
|
1117
1143
|
*/
|
|
1118
|
-
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;
|
|
1119
1145
|
/**
|
|
1120
1146
|
* Checks if given url points to another "service" than second given url.
|
|
1121
1147
|
* If no second given url provided current url will be assumed.
|
|
@@ -1125,46 +1151,52 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1125
1151
|
* @returns Returns "true" if given first url has same domain as given
|
|
1126
1152
|
* second (or current).
|
|
1127
1153
|
*/
|
|
1128
|
-
static stringServiceURLEquals(url: string, referenceURL?: string): boolean;
|
|
1154
|
+
static stringServiceURLEquals(this: void, url: string, referenceURL?: string): boolean;
|
|
1129
1155
|
/**
|
|
1130
1156
|
* Normalized given website url.
|
|
1131
1157
|
* @param url - Uniform resource locator to normalize.
|
|
1158
|
+
*
|
|
1132
1159
|
* @returns Normalized result.
|
|
1133
1160
|
*/
|
|
1134
|
-
static stringNormalizeURL(url: string): string;
|
|
1161
|
+
static stringNormalizeURL(this: void, url: string): string;
|
|
1135
1162
|
/**
|
|
1136
1163
|
* Represents given website url.
|
|
1137
1164
|
* @param url - Uniform resource locator to represent.
|
|
1165
|
+
*
|
|
1138
1166
|
* @returns Represented result.
|
|
1139
1167
|
*/
|
|
1140
|
-
static stringRepresentURL(url: unknown): string;
|
|
1168
|
+
static stringRepresentURL(this: void, url: unknown): string;
|
|
1141
1169
|
/**
|
|
1142
1170
|
* Converts a camel cased string to its delimited string version.
|
|
1143
|
-
* @param
|
|
1171
|
+
* @param value - The string to format.
|
|
1144
1172
|
* @param delimiter - Delimiter string
|
|
1145
1173
|
* @param abbreviations - Collection of shortcut words to represent upper
|
|
1146
1174
|
* cased.
|
|
1175
|
+
*
|
|
1147
1176
|
* @returns The formatted string.
|
|
1148
1177
|
*/
|
|
1149
|
-
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;
|
|
1150
1179
|
/**
|
|
1151
1180
|
* Converts a string to its capitalize representation.
|
|
1152
1181
|
* @param string - The string to format.
|
|
1182
|
+
*
|
|
1153
1183
|
* @returns The formatted string.
|
|
1154
1184
|
*/
|
|
1155
|
-
static stringCapitalize(string: string): string;
|
|
1185
|
+
static stringCapitalize(this: void, string: string): string;
|
|
1156
1186
|
/**
|
|
1157
1187
|
* Compresses given style attribute value.
|
|
1158
1188
|
* @param styleValue - Style value to compress.
|
|
1189
|
+
*
|
|
1159
1190
|
* @returns The compressed value.
|
|
1160
1191
|
*/
|
|
1161
|
-
static stringCompressStyleValue(styleValue: string): string;
|
|
1192
|
+
static stringCompressStyleValue(this: void, styleValue: string): string;
|
|
1162
1193
|
/**
|
|
1163
1194
|
* Decodes all html symbols in text nodes in given html string.
|
|
1164
1195
|
* @param htmlString - HTML string to decode.
|
|
1196
|
+
*
|
|
1165
1197
|
* @returns Decoded html string.
|
|
1166
1198
|
*/
|
|
1167
|
-
static stringDecodeHTMLEntities(htmlString: string): null | string;
|
|
1199
|
+
static stringDecodeHTMLEntities(this: void, htmlString: string): null | string;
|
|
1168
1200
|
/**
|
|
1169
1201
|
* Converts a delimited string to its camel case representation.
|
|
1170
1202
|
* @param string - The string to format.
|
|
@@ -1178,7 +1210,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1178
1210
|
*
|
|
1179
1211
|
* @returns The formatted string.
|
|
1180
1212
|
*/
|
|
1181
|
-
static stringDelimitedToCamelCase(
|
|
1213
|
+
static stringDelimitedToCamelCase(this: void, value: string, delimiter?: string, abbreviations?: Array<string> | null, preserveWrongFormattedAbbreviations?: boolean, removeMultipleDelimiter?: boolean): string;
|
|
1182
1214
|
/**
|
|
1183
1215
|
* Compiles a given string as expression with given scope names.
|
|
1184
1216
|
* @param expression - The string to interpret.
|
|
@@ -1188,7 +1220,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1188
1220
|
* @returns Object of prepared scope name mappings and compiled function or
|
|
1189
1221
|
* error string message if given expression couldn't be compiled.
|
|
1190
1222
|
*/
|
|
1191
|
-
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>;
|
|
1192
1224
|
/**
|
|
1193
1225
|
* Evaluates a given string as expression against given scope.
|
|
1194
1226
|
* @param expression - The string to interpret.
|
|
@@ -1198,7 +1230,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1198
1230
|
*
|
|
1199
1231
|
* @returns Object with error message during parsing / running or result.
|
|
1200
1232
|
*/
|
|
1201
|
-
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>;
|
|
1202
1234
|
/**
|
|
1203
1235
|
* Finds the string match of given query in given target text by applying
|
|
1204
1236
|
* given normalisation function to target and query.
|
|
@@ -1210,7 +1242,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1210
1242
|
*
|
|
1211
1243
|
* @returns Start and end index of matching range.
|
|
1212
1244
|
*/
|
|
1213
|
-
static stringFindNormalizedMatchRange(target: unknown, query: unknown, normalizer?: AnyFunction, skipTags?: boolean): Array<number> | null;
|
|
1245
|
+
static stringFindNormalizedMatchRange(this: void, target: unknown, query: unknown, normalizer?: AnyFunction, skipTags?: boolean): Array<number> | null;
|
|
1214
1246
|
/**
|
|
1215
1247
|
* Performs a string formation. Replaces every placeholder "{i}" with the
|
|
1216
1248
|
* i'th argument.
|
|
@@ -1220,35 +1252,39 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1220
1252
|
*
|
|
1221
1253
|
* @returns The formatted string.
|
|
1222
1254
|
*/
|
|
1223
|
-
static stringFormat(string: string, ...additionalArguments: Array<unknown>): string;
|
|
1255
|
+
static stringFormat(this: void, string: string, ...additionalArguments: Array<unknown>): string;
|
|
1224
1256
|
/**
|
|
1225
1257
|
* Calculates the edit (levenstein) distance between two given strings.
|
|
1226
1258
|
* @param first - First string to compare.
|
|
1227
1259
|
* @param second - Second string to compare.
|
|
1260
|
+
*
|
|
1228
1261
|
* @returns The distance as number.
|
|
1229
1262
|
*/
|
|
1230
|
-
static stringGetEditDistance(first: string, second: string): number;
|
|
1263
|
+
static stringGetEditDistance(this: void, first: string, second: string): number;
|
|
1231
1264
|
/**
|
|
1232
1265
|
* Validates the current string for using in a regular expression pattern.
|
|
1233
1266
|
* Special regular expression chars will be escaped.
|
|
1234
|
-
* @param
|
|
1267
|
+
* @param value - The string to format.
|
|
1268
|
+
*
|
|
1235
1269
|
* @returns The formatted string.
|
|
1236
1270
|
*/
|
|
1237
|
-
static stringGetRegularExpressionValidated(
|
|
1271
|
+
static stringGetRegularExpressionValidated(this: void, value: string): string;
|
|
1238
1272
|
/**
|
|
1239
1273
|
* Interprets given content string as date time.
|
|
1240
1274
|
* @param value - Date time string to interpret.
|
|
1241
1275
|
* @param interpretAsUTC - Identifies if given date should be interpret as
|
|
1242
1276
|
* utc.
|
|
1277
|
+
*
|
|
1243
1278
|
* @returns Interpret date time object.
|
|
1244
1279
|
*/
|
|
1245
|
-
static stringInterpretDateTime(value: string, interpretAsUTC?: boolean): Date | null;
|
|
1280
|
+
static stringInterpretDateTime(this: void, value: string, interpretAsUTC?: boolean): Date | null;
|
|
1246
1281
|
/**
|
|
1247
1282
|
* Converts a string to its lower case representation.
|
|
1248
1283
|
* @param string - The string to format.
|
|
1284
|
+
*
|
|
1249
1285
|
* @returns The formatted string.
|
|
1250
1286
|
*/
|
|
1251
|
-
static stringLowerCase(string: string): string;
|
|
1287
|
+
static stringLowerCase(this: void, string: string): string;
|
|
1252
1288
|
/**
|
|
1253
1289
|
* Wraps given mark strings in given target with given marker.
|
|
1254
1290
|
* @param target - String to search for marker.
|
|
@@ -1259,7 +1295,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1259
1295
|
*
|
|
1260
1296
|
* @returns Processed result.
|
|
1261
1297
|
*/
|
|
1262
|
-
static stringMark(target: unknown, givenWords?: Array<string> | string, normalizer?: AnyFunction, marker?: string): unknown;
|
|
1298
|
+
static stringMark(this: void, target: unknown, givenWords?: Array<string> | string, normalizer?: AnyFunction, marker?: string): unknown;
|
|
1263
1299
|
/**
|
|
1264
1300
|
* Implements the md5 hash algorithm.
|
|
1265
1301
|
* @param value - Value to calculate md5 hash for.
|
|
@@ -1268,7 +1304,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1268
1304
|
*
|
|
1269
1305
|
* @returns Calculated md5 hash value.
|
|
1270
1306
|
*/
|
|
1271
|
-
static stringMD5(value: string, onlyAscii?: boolean): string;
|
|
1307
|
+
static stringMD5(this: void, value: string, onlyAscii?: boolean): string;
|
|
1272
1308
|
/**
|
|
1273
1309
|
* Normalizes given phone number for automatic dialing or comparison.
|
|
1274
1310
|
* @param value - Number to normalize.
|
|
@@ -1277,13 +1313,13 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1277
1313
|
*
|
|
1278
1314
|
* @returns Normalized number.
|
|
1279
1315
|
*/
|
|
1280
|
-
static stringNormalizePhoneNumber(value: unknown, dialable?: boolean): string;
|
|
1316
|
+
static stringNormalizePhoneNumber(this: void, value: unknown, dialable?: boolean): string;
|
|
1281
1317
|
/**
|
|
1282
1318
|
* Normalizes given zip code for automatic address processing.
|
|
1283
1319
|
* @param value - Number to normalize.
|
|
1284
1320
|
* @returns Normalized number.
|
|
1285
1321
|
*/
|
|
1286
|
-
static stringNormalizeZipCode(value: unknown): string;
|
|
1322
|
+
static stringNormalizeZipCode(this: void, value: unknown): string;
|
|
1287
1323
|
/**
|
|
1288
1324
|
* Converts given serialized, base64 encoded or file path given object into
|
|
1289
1325
|
* a native javaScript one if possible.
|
|
@@ -1294,29 +1330,33 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1294
1330
|
*
|
|
1295
1331
|
* @returns The parsed object if possible and null otherwise.
|
|
1296
1332
|
*/
|
|
1297
|
-
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;
|
|
1298
1334
|
/**
|
|
1299
1335
|
* Represents given phone number. NOTE: Currently only support german phone
|
|
1300
1336
|
* numbers.
|
|
1301
1337
|
* @param value - Number to format.
|
|
1338
|
+
*
|
|
1302
1339
|
* @returns Formatted number.
|
|
1303
1340
|
*/
|
|
1304
|
-
static stringRepresentPhoneNumber(value: unknown): string;
|
|
1341
|
+
static stringRepresentPhoneNumber(this: void, value: unknown): string;
|
|
1305
1342
|
/**
|
|
1306
1343
|
* Slices all none numbers but preserves last separator.
|
|
1307
1344
|
* @param value - String to process.
|
|
1345
|
+
*
|
|
1308
1346
|
* @returns - Sliced given value.
|
|
1309
1347
|
*/
|
|
1310
|
-
static stringSliceAllExceptNumberAndLastSeperator(value: string): string;
|
|
1348
|
+
static stringSliceAllExceptNumberAndLastSeperator(this: void, value: string): string;
|
|
1311
1349
|
/**
|
|
1312
1350
|
* Slice weekday from given date representation.
|
|
1313
1351
|
* @param value - String to process.
|
|
1352
|
+
*
|
|
1314
1353
|
* @returns Sliced given string.
|
|
1315
1354
|
*/
|
|
1316
|
-
static stringSliceWeekday(value: string): string;
|
|
1355
|
+
static stringSliceWeekday(this: void, value: string): string;
|
|
1317
1356
|
/**
|
|
1318
1357
|
* Converts a dom selector to a prefixed dom selector string.
|
|
1319
1358
|
* @param selector - A dom node selector.
|
|
1359
|
+
*
|
|
1320
1360
|
* @returns Returns given selector prefixed.
|
|
1321
1361
|
*/
|
|
1322
1362
|
stringNormalizeDomNodeSelector: (selector: string) => string;
|
|
@@ -1328,20 +1368,22 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1328
1368
|
*
|
|
1329
1369
|
* @returns Determined numerous value.
|
|
1330
1370
|
*/
|
|
1331
|
-
static numberGetUTCTimestamp(value?: Date | null | number | string, inMilliseconds?: boolean): number;
|
|
1371
|
+
static numberGetUTCTimestamp(this: void, value?: Date | null | number | string, inMilliseconds?: boolean): number;
|
|
1332
1372
|
/**
|
|
1333
1373
|
* Checks if given object is java scripts native "Number.NaN" object.
|
|
1334
1374
|
* @param value - Value to check.
|
|
1375
|
+
*
|
|
1335
1376
|
* @returns Returns whether given value is not a number or not.
|
|
1336
1377
|
*/
|
|
1337
|
-
static numberIsNotANumber(value: unknown): boolean;
|
|
1378
|
+
static numberIsNotANumber(this: void, value: unknown): boolean;
|
|
1338
1379
|
/**
|
|
1339
1380
|
* Rounds a given number accurate to given number of digits.
|
|
1340
1381
|
* @param number - The number to round.
|
|
1341
1382
|
* @param digits - The number of digits after comma.
|
|
1383
|
+
*
|
|
1342
1384
|
* @returns Returns the rounded number.
|
|
1343
1385
|
*/
|
|
1344
|
-
static numberRound(number: number, digits?: number): number;
|
|
1386
|
+
static numberRound(this: void, number: number, digits?: number): number;
|
|
1345
1387
|
/**
|
|
1346
1388
|
* Checks if given url response with given status code.
|
|
1347
1389
|
* @param url - Url to check reachability.
|
|
@@ -1366,7 +1408,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1366
1408
|
* finished and resulting status code matches given expected status code.
|
|
1367
1409
|
* Otherwise returned promise will be rejected.
|
|
1368
1410
|
*/
|
|
1369
|
-
static checkReachability(url: string, givenOptions?: RecursivePartial<CheckReachabilityOptions>): ReturnType<typeof fetch>;
|
|
1411
|
+
static checkReachability(this: void, url: string, givenOptions?: RecursivePartial<CheckReachabilityOptions>): ReturnType<typeof fetch>;
|
|
1370
1412
|
/**
|
|
1371
1413
|
* Checks if given url isn't reachable.
|
|
1372
1414
|
* @param url - Url to check reachability.
|
|
@@ -1390,7 +1432,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1390
1432
|
* resolving when final timeout is reached or the endpoint is unreachable
|
|
1391
1433
|
* (after some tries).
|
|
1392
1434
|
*/
|
|
1393
|
-
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>>;
|
|
1394
1436
|
/**
|
|
1395
1437
|
* Send given data to a given iframe.
|
|
1396
1438
|
* @param target - Name of the target iframe or the target iframe itself.
|
|
@@ -1404,7 +1446,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1404
1446
|
*
|
|
1405
1447
|
* @returns Returns the given target as extended dom node.
|
|
1406
1448
|
*/
|
|
1407
|
-
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;
|
|
1408
1450
|
/**
|
|
1409
1451
|
* Send given data to a temporary created iframe.
|
|
1410
1452
|
* @param url - URL to send to data to.
|
|
@@ -1430,7 +1472,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1430
1472
|
*
|
|
1431
1473
|
* @returns Promise holding the determined target directory path.
|
|
1432
1474
|
*/
|
|
1433
|
-
static copyDirectoryRecursive(sourcePath: string, targetPath: string, callback?: AnyFunction, readOptions?: PlainObject, writeOptions?: PlainObject): Promise<string>;
|
|
1475
|
+
static copyDirectoryRecursive(this: void, sourcePath: string, targetPath: string, callback?: AnyFunction, readOptions?: PlainObject, writeOptions?: PlainObject): Promise<string>;
|
|
1434
1476
|
/**
|
|
1435
1477
|
* Copies given source directory via path to given target directory
|
|
1436
1478
|
* location with same target name as source file has or copy to given
|
|
@@ -1444,7 +1486,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1444
1486
|
*
|
|
1445
1487
|
* @returns Determined target directory path.
|
|
1446
1488
|
*/
|
|
1447
|
-
static copyDirectoryRecursiveSync(sourcePath: string, targetPath: string, callback?: AnyFunction, readOptions?: PlainObject, writeOptions?: PlainObject): string;
|
|
1489
|
+
static copyDirectoryRecursiveSync(this: void, sourcePath: string, targetPath: string, callback?: AnyFunction, readOptions?: PlainObject, writeOptions?: PlainObject): string;
|
|
1448
1490
|
/**
|
|
1449
1491
|
* Copies given source file via path to given target directory location
|
|
1450
1492
|
* with same target name as source file has or copy to given complete
|
|
@@ -1457,7 +1499,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1457
1499
|
*
|
|
1458
1500
|
* @returns Determined target file path.
|
|
1459
1501
|
*/
|
|
1460
|
-
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>;
|
|
1461
1503
|
/**
|
|
1462
1504
|
* Copies given source file via path to given target directory location
|
|
1463
1505
|
* with same target name as source file has or copy to given complete
|
|
@@ -1470,21 +1512,22 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1470
1512
|
*
|
|
1471
1513
|
* @returns Determined target file path.
|
|
1472
1514
|
*/
|
|
1473
|
-
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;
|
|
1474
1516
|
/**
|
|
1475
1517
|
* Checks if given path points to a valid directory.
|
|
1476
1518
|
* @param filePath - Path to directory.
|
|
1519
|
+
*
|
|
1477
1520
|
* @returns A promise holding a boolean which indicates directory
|
|
1478
1521
|
* existence.
|
|
1479
1522
|
*/
|
|
1480
|
-
static isDirectory(filePath: string): Promise<boolean>;
|
|
1523
|
+
static isDirectory(this: void, filePath: string): Promise<boolean>;
|
|
1481
1524
|
/**
|
|
1482
1525
|
* Checks if given path points to a valid directory.
|
|
1483
1526
|
* @param filePath - Path to directory.
|
|
1484
1527
|
*
|
|
1485
1528
|
* @returns A boolean which indicates directory existents.
|
|
1486
1529
|
*/
|
|
1487
|
-
static isDirectorySync(filePath: string): boolean;
|
|
1530
|
+
static isDirectorySync(this: void, filePath: string): boolean;
|
|
1488
1531
|
/**
|
|
1489
1532
|
* Checks if given path points to a valid file.
|
|
1490
1533
|
* @param filePath - Path to directory.
|
|
@@ -1492,14 +1535,14 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1492
1535
|
* @returns A promise holding a boolean which indicates directory
|
|
1493
1536
|
* existence.
|
|
1494
1537
|
*/
|
|
1495
|
-
static isFile(filePath: string): Promise<boolean>;
|
|
1538
|
+
static isFile(this: void, filePath: string): Promise<boolean>;
|
|
1496
1539
|
/**
|
|
1497
1540
|
* Checks if given path points to a valid file.
|
|
1498
1541
|
* @param filePath - Path to file.
|
|
1499
1542
|
*
|
|
1500
1543
|
* @returns A boolean which indicates file existence.
|
|
1501
1544
|
*/
|
|
1502
|
-
static isFileSync(filePath: string): boolean;
|
|
1545
|
+
static isFileSync(this: void, filePath: string): boolean;
|
|
1503
1546
|
/**
|
|
1504
1547
|
* Iterates through given directory structure recursively and calls given
|
|
1505
1548
|
* callback for each found file. Callback gets file path and corresponding
|
|
@@ -1511,7 +1554,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1511
1554
|
*
|
|
1512
1555
|
* @returns A promise holding the determined files.
|
|
1513
1556
|
*/
|
|
1514
|
-
static walkDirectoryRecursively(directoryPath: string, callback?: AnyFunction | null, options?: SecondParameter<typeof import('fs').readdir>): Promise<Array<File>>;
|
|
1557
|
+
static walkDirectoryRecursively(this: void, directoryPath: string, callback?: AnyFunction | null, options?: Encoding | SecondParameter<typeof import('fs').readdir>): Promise<Array<File>>;
|
|
1515
1558
|
/**
|
|
1516
1559
|
* Iterates through given directory structure recursively and calls given
|
|
1517
1560
|
* callback for each found file. Callback gets file path and corresponding
|
|
@@ -1522,7 +1565,7 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1522
1565
|
*
|
|
1523
1566
|
* @returns Determined list if all files.
|
|
1524
1567
|
*/
|
|
1525
|
-
static walkDirectoryRecursivelySync(directoryPath: string, callback?: AnyFunction | null, options?: SecondParameter<typeof import('fs').readdirSync>): Array<File>;
|
|
1568
|
+
static walkDirectoryRecursivelySync(this: void, directoryPath: string, callback?: AnyFunction | null, options?: Encoding | SecondParameter<typeof import('fs').readdirSync>): Array<File>;
|
|
1526
1569
|
/**
|
|
1527
1570
|
* Generates a one shot close handler which triggers given promise methods.
|
|
1528
1571
|
* If a reason is provided it will be given as resolve target. An Error
|
|
@@ -1537,17 +1580,18 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1537
1580
|
*
|
|
1538
1581
|
* @returns Process close handler function.
|
|
1539
1582
|
*/
|
|
1540
|
-
static getProcessCloseHandler(resolve: ProcessCloseCallback, reject: ProcessErrorCallback, reason?: unknown, callback?: AnyFunction): ProcessHandler;
|
|
1583
|
+
static getProcessCloseHandler(this: void, resolve: ProcessCloseCallback, reject: ProcessErrorCallback, reason?: unknown, callback?: AnyFunction): ProcessHandler;
|
|
1541
1584
|
/**
|
|
1542
1585
|
* Forwards given child process communication channels to corresponding
|
|
1543
1586
|
* current process communication channels.
|
|
1544
1587
|
* @param childProcess - Child process meta data.
|
|
1588
|
+
*
|
|
1545
1589
|
* @returns Given child process meta data.
|
|
1546
1590
|
*/
|
|
1547
|
-
static handleChildProcess(childProcess: ChildProcess): ChildProcess;
|
|
1591
|
+
static handleChildProcess(this: void, childProcess: ChildProcess): ChildProcess;
|
|
1548
1592
|
/**
|
|
1549
1593
|
* Helper method for attach/remove event handler methods.
|
|
1550
|
-
* @param
|
|
1594
|
+
* @param parameters - Arguments object given to methods like "on()" or
|
|
1551
1595
|
* "off()".
|
|
1552
1596
|
* @param removeEvent - Indicates if handler should be attached or removed.
|
|
1553
1597
|
* @param eventFunctionName - Name of function to wrap.
|
|
@@ -1556,6 +1600,9 @@ export declare class Tools<TElement = HTMLElement, LockType = string | void> {
|
|
|
1556
1600
|
*/
|
|
1557
1601
|
_bindEventHelper: <TElement_1 = HTMLElement>(parameters: Array<unknown>, removeEvent?: boolean, eventFunctionName?: string | undefined) => $DomNode<TElement_1>;
|
|
1558
1602
|
}
|
|
1603
|
+
/**
|
|
1604
|
+
* Dom bound version of Tools class.
|
|
1605
|
+
*/
|
|
1559
1606
|
export declare class BoundTools<TElement extends HTMLElement = HTMLElement, LockType = string | void> extends Tools<TElement, LockType> {
|
|
1560
1607
|
$domNode: $DomNode<TElement>;
|
|
1561
1608
|
readonly self: typeof BoundTools;
|