clientnode 4.0.1491 → 4.0.1493

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.
Files changed (113) hide show
  1. package/dist/Lock.js +83 -68
  2. package/dist/Logger.js +163 -693
  3. package/dist/Semaphore.js +46 -55
  4. package/dist/array.js +337 -545
  5. package/dist/cli.js +37 -44
  6. package/dist/constants.js +110 -184
  7. package/dist/context.js +25 -209
  8. package/dist/cookie.js +48 -204
  9. package/dist/data-transfer.js +166 -701
  10. package/dist/datetime.js +245 -1042
  11. package/dist/domNode.js +277 -427
  12. package/dist/expression/evaluators.js +234 -1108
  13. package/dist/expression/helper.js +82 -100
  14. package/dist/expression/index.js +10 -1253
  15. package/dist/expression/indicator-functions.js +21 -208
  16. package/dist/expression/type.js +5 -1
  17. package/dist/filesystem.js +324 -286
  18. package/dist/function.js +51 -90
  19. package/dist/index.js +26 -3059
  20. package/dist/indicators.js +79 -418
  21. package/dist/module.js +109 -154
  22. package/dist/number.js +25 -397
  23. package/dist/object.js +803 -849
  24. package/dist/process.js +38 -200
  25. package/dist/property-types.js +96 -17
  26. package/dist/scope.js +56 -1982
  27. package/dist/string.js +626 -924
  28. package/dist/test-helper.js +289 -514
  29. package/dist/type.js +9 -4
  30. package/dist/utility.js +91 -310
  31. package/package.json +3 -3
  32. package/dist/Lock.d.ts +0 -39
  33. package/dist/Logger.d.ts +0 -102
  34. package/dist/Semaphore.d.ts +0 -29
  35. package/dist/array.d.ts +0 -150
  36. package/dist/bundle/index.js +0 -4507
  37. package/dist/cli.d.ts +0 -31
  38. package/dist/compatible/Lock.js +0 -85
  39. package/dist/compatible/Logger.js +0 -715
  40. package/dist/compatible/Semaphore.js +0 -74
  41. package/dist/compatible/array.js +0 -660
  42. package/dist/compatible/cli.js +0 -58
  43. package/dist/compatible/constants.js +0 -200
  44. package/dist/compatible/context.js +0 -224
  45. package/dist/compatible/cookie.js +0 -240
  46. package/dist/compatible/data-transfer.js +0 -751
  47. package/dist/compatible/datetime.js +0 -1083
  48. package/dist/compatible/domNode.js +0 -481
  49. package/dist/compatible/expression/evaluators.js +0 -1147
  50. package/dist/compatible/expression/helper.js +0 -115
  51. package/dist/compatible/expression/index.js +0 -1269
  52. package/dist/compatible/expression/indicator-functions.js +0 -224
  53. package/dist/compatible/expression/type.js +0 -16
  54. package/dist/compatible/filesystem.js +0 -373
  55. package/dist/compatible/function.js +0 -114
  56. package/dist/compatible/index.js +0 -3076
  57. package/dist/compatible/indicators.js +0 -471
  58. package/dist/compatible/module.js +0 -168
  59. package/dist/compatible/number.js +0 -433
  60. package/dist/compatible/object.js +0 -1037
  61. package/dist/compatible/process.js +0 -230
  62. package/dist/compatible/property-types.js +0 -36
  63. package/dist/compatible/scope.js +0 -2011
  64. package/dist/compatible/string.js +0 -1151
  65. package/dist/compatible/test-helper.js +0 -837
  66. package/dist/compatible/type.js +0 -16
  67. package/dist/compatible/utility.js +0 -358
  68. package/dist/constants.d.ts +0 -99
  69. package/dist/context.d.ts +0 -8
  70. package/dist/cookie.d.ts +0 -31
  71. package/dist/data-transfer.d.ts +0 -45
  72. package/dist/datetime.d.ts +0 -37
  73. package/dist/domNode.d.ts +0 -82
  74. package/dist/expression/evaluators.d.ts +0 -55
  75. package/dist/expression/helper.d.ts +0 -4
  76. package/dist/expression/index.d.ts +0 -7
  77. package/dist/expression/indicator-functions.d.ts +0 -14
  78. package/dist/expression/type.d.ts +0 -70
  79. package/dist/filesystem.d.ts +0 -143
  80. package/dist/function.d.ts +0 -20
  81. package/dist/index.d.ts +0 -23
  82. package/dist/indicators.d.ts +0 -68
  83. package/dist/module.d.ts +0 -10
  84. package/dist/number.d.ts +0 -35
  85. package/dist/object.d.ts +0 -231
  86. package/dist/process.d.ts +0 -22
  87. package/dist/property-types.d.ts +0 -460
  88. package/dist/scope.d.ts +0 -44
  89. package/dist/string.d.ts +0 -319
  90. package/dist/test/Lock.d.ts +0 -1
  91. package/dist/test/Logger.d.ts +0 -1
  92. package/dist/test/Semaphore.d.ts +0 -1
  93. package/dist/test/array.d.ts +0 -1
  94. package/dist/test/cookie.d.ts +0 -1
  95. package/dist/test/data-transfer.d.ts +0 -1
  96. package/dist/test/datetime.d.ts +0 -1
  97. package/dist/test/domNode.d.ts +0 -1
  98. package/dist/test/expression/evaluators.d.ts +0 -1
  99. package/dist/test/expression/helper.d.ts +0 -1
  100. package/dist/test/expression/indicator-functions.d.ts +0 -1
  101. package/dist/test/filesystem.d.ts +0 -1
  102. package/dist/test/function.d.ts +0 -1
  103. package/dist/test/indicators.d.ts +0 -1
  104. package/dist/test/number.d.ts +0 -1
  105. package/dist/test/object.d.ts +0 -1
  106. package/dist/test/process.d.ts +0 -1
  107. package/dist/test/property-types.d.ts +0 -1
  108. package/dist/test/scope.d.ts +0 -1
  109. package/dist/test/string.d.ts +0 -1
  110. package/dist/test/utility.d.ts +0 -1
  111. package/dist/test-helper.d.ts +0 -245
  112. package/dist/type.d.ts +0 -248
  113. package/dist/utility.d.ts +0 -44
package/dist/string.d.ts DELETED
@@ -1,319 +0,0 @@
1
- import { CompilationResult, CompileExpressionOptions, EvaluateExpressionOptions, EvaluationResult, Mapping, PlainObject, StringMarkOptions, QueryParameters } from './type';
2
- export declare const KNOWN_DISALLOWED_VARIABLE_NAMES_BUT_OBJECT_KEYS: string[];
3
- export declare const POLYFILL_TEMPLATE_STRINGS: {
4
- value: boolean;
5
- };
6
- export declare const ALLOWED_VARIABLE_SYMBOLS = "0-9a-zA-Z_$";
7
- export declare const ALLOWED_STARTING_VARIABLE_SYMBOLS = "a-zA-Z_$";
8
- export declare const FIX_ENCODING_ERROR_MAPPING: readonly [readonly ["Ã\\x84", "Ä"], readonly ["Ã\\x96", "Ö"], readonly ["Ã\\x9c", "Ü"], readonly ["ä", "ä"], readonly ["ö", "ö"], readonly ["ü", "ü"], readonly ["\\x96", "-"], readonly ["é", "é"], readonly ["è", "e"], readonly ["ô", "o"], readonly ["à ", "á"], readonly ["ø", "ø"], readonly ["Ã\\x9f", "ß"], readonly ["Ã", "ß"]];
9
- export declare const AsyncFunction: any;
10
- /**
11
- * Translates a given string into the regular expression validated
12
- * representation.
13
- * @param value - String to convert.
14
- * @param excludeSymbols - Symbols not to escape.
15
- * @returns Converted string.
16
- */
17
- export declare const escapeRegularExpressions: (value: string, excludeSymbols?: Array<string>) => string;
18
- /**
19
- * Translates a given name into a valid JavaScript one.
20
- * @param name - Name to convert.
21
- * @returns Converted name is returned.
22
- */
23
- export declare const convertToValidVariableName: (name: string) => string;
24
- /**
25
- * This method is intended for encoding *key* or *value* parts of a query
26
- * component. We need a custom method because "encodeURIComponent()" is too
27
- * aggressive and encodes stuff that doesn't have to be encoded per
28
- * "http://tools.ietf.org/html/rfc3986:".
29
- * @param url - URL to encode.
30
- * @param encodeSpaces - Indicates whether given url should encode
31
- * whitespaces as "+" or "%20".
32
- * @returns Encoded given url.
33
- */
34
- export declare const encodeURIComponentExtended: (url: string, encodeSpaces?: boolean) => string;
35
- /**
36
- * Appends a path selector to the given path if there isn't one yet.
37
- * @param path - The path for appending a selector.
38
- * @param pathSeparator - The selector for appending to a path.
39
- * @returns The appended path.
40
- */
41
- export declare const addSeparatorToPath: (path: string, pathSeparator?: string) => string;
42
- /**
43
- * Checks if a given path has given path prefix.
44
- * @param prefix - Path prefix to search for.
45
- * @param path - Path to search in.
46
- * @param separator - Delimiter to use in a path (default is the posix
47
- * conform slash).
48
- * @returns Value "true" if given prefix occurs and "false" otherwise.
49
- */
50
- export declare const hasPathPrefix: (prefix?: unknown, path?: string, separator?: string) => boolean;
51
- /**
52
- * Extracts domain name from given url. If no explicit domain name given
53
- * current domain name will be assumed. If no parameter is given, the current
54
- * domain name will be determined.
55
- * @param url - The url to extract domain from.
56
- * @param fallback - The fallback host name if no one exits in given url
57
- * (default is current hostname).
58
- * @returns Extracted domain.
59
- */
60
- export declare const getDomainName: (url?: string, fallback?: string) => string;
61
- /**
62
- * Extracts port number from given url. If no explicit port number is given
63
- * and no fallback is defined, the current port number will be assumed for local
64
- * links. For external links 80 will be assumed for http protocols and 443
65
- * for https protocols.
66
- * @param url - The url to extract port from.
67
- * @param fallback - Fallback port number if no explicit one was found.
68
- * Default is derived from the current protocol name.
69
- * @returns Extracted port number.
70
- */
71
- export declare const getPortNumber: (url?: string, fallback?: null | number) => null | number;
72
- /**
73
- * Extracts protocol name from given url. If no explicit url is given,
74
- * the current protocol will be assumed. If no parameter is given, the current
75
- * protocol number will be determined.
76
- * @param url - The url to extract protocol from.
77
- * @param fallback - Fallback port to use if no protocol exists in given
78
- * url (default is current protocol).
79
- * @returns Extracted protocol.
80
- */
81
- export declare const getProtocolName: (url?: string, fallback?: string) => string;
82
- /**
83
- * Read a page's GET URL variables and return them as an associative array
84
- * and preserves ordering.
85
- * @param keyToGet - If provided the corresponding value for a given key is
86
- * returned or full object otherwise.
87
- * @param allowDuplicates - Indicates whether to return arrays of values or
88
- * single values. If set to "false" (default) last values will overwrite
89
- * preceding values.
90
- * @param givenInput - An alternative input to the url search parameter. If
91
- * "#" is given, the complete current hashtag will be interpreted as url and
92
- * search parameter will be extracted from there. If "&" is given a classical
93
- * search parameter, and hash parameter will be taken in an account. If a
94
- * search string is given, this will be analyzed. The default is to take a
95
- * given search part into account.
96
- * @param subDelimiter - Defines which sequence indicates the start of
97
- * parameter in a hash part of the url.
98
- * @param hashedPathIndicator - If defined and given hash starts with this
99
- * indicator, given hash will be interpreted as a path containing search and
100
- * hash parts.
101
- * @param givenSearch - Search part to take into account defaults to
102
- * current url search part.
103
- * @param givenHash - Hash part to take into account defaults to current
104
- * url hash part.
105
- * @returns Returns the current get array or requested value. If the requested
106
- * key doesn't exist, "undefined" is returned.
107
- */
108
- export declare const getURLParameter: (keyToGet?: null | string, allowDuplicates?: boolean, givenInput?: null | string, subDelimiter?: string, hashedPathIndicator?: string, givenSearch?: null | string, givenHash?: null | string) => Array<string> | null | QueryParameters | string;
109
- /**
110
- * Checks if given url points to another "service" than the second given url.
111
- * If no second given url is provided, the current url will be assumed.
112
- * @param url - URL to check against second url.
113
- * @param referenceURL - URL to check against first url.
114
- * @returns Returns "true" if given first url has same domain as given
115
- * second (or current).
116
- */
117
- export declare const serviceURLEquals: (url: string, referenceURL?: string) => boolean;
118
- /**
119
- * Normalized given website url.
120
- * @param givenURL - Uniform resource locator to normalize.
121
- * @returns Normalized result.
122
- */
123
- export declare const normalizeURL: (givenURL: unknown) => string;
124
- /**
125
- * Represents given website url.
126
- * @param url - Uniform resource locator to represent.
127
- * @returns Represented result.
128
- */
129
- export declare const representURL: (url: unknown) => string;
130
- /**
131
- * Converts a camel-cased string to its delimited string version.
132
- * @param value - The string to format.
133
- * @param delimiter - Defines delimiter string.
134
- * @param abbreviations - Collection of shortcut words to represent uppercased.
135
- * @returns The formatted string.
136
- */
137
- export declare const camelCaseToDelimited: (value: string, delimiter?: string, abbreviations?: Array<string> | null) => string;
138
- /**
139
- * Converts a string to its capitalized representation.
140
- * @param string - The string to format.
141
- * @returns The formatted string.
142
- */
143
- export declare const capitalize: (string: string) => string;
144
- /**
145
- * Compresses given style attribute value.
146
- * @param styleValue - Style value to compress.
147
- * @returns The compressed value.
148
- */
149
- export declare const compressStyleValue: (styleValue: string) => string;
150
- /**
151
- * Decodes all html symbols in text nodes in a given html string.
152
- * @param htmlString - HTML string to decode.
153
- * @returns Decoded html string.
154
- */
155
- export declare const decodeHTMLEntities: (htmlString: string) => null | string;
156
- /**
157
- * Converts a delimited string to its camel case representation.
158
- * @param value - The string to format.
159
- * @param delimiter - Delimiter string to use.
160
- * @param abbreviations - Collection of shortcut words to represent uppercased.
161
- * @param preserveWrongFormattedAbbreviations - If set to "True" wrong
162
- * formatted camel case abbreviations will be ignored.
163
- * @param removeMultipleDelimiter - Indicates whether a series of delimiter
164
- * should be consolidated.
165
- * @returns The formatted string.
166
- */
167
- export declare const delimitedToCamelCase: (value: string, delimiter?: string, abbreviations?: Array<string> | null, preserveWrongFormattedAbbreviations?: boolean, removeMultipleDelimiter?: boolean) => string;
168
- /**
169
- * Compiles a given string as an expression with given scope names.
170
- * @param expression - The string to interpret.
171
- * @param givenOptions - Expression options.
172
- * @param givenOptions.scope - Scope to extract names from.
173
- * @param givenOptions.execute - Indicates whether to execute or evaluate.
174
- * @param givenOptions.removeGlobalScope - Indicates whether to shadow global
175
- * scope.
176
- * @param givenOptions.binding - Object to apply as "this" in evaluation scope.
177
- * @param givenOptions.async - Indicates whether to compile an async function.
178
- * @returns Object of prepared scope name mappings and compiled function or
179
- * error string message if given expression couldn't be compiled.
180
- */
181
- export declare const compile: <T = string, N extends Array<string> = Array<string>>(expression: string, givenOptions?: Partial<CompileExpressionOptions<N>>) => CompilationResult<T, N>;
182
- /**
183
- * Evaluates a given string as an expression against a given scope.
184
- * @param expression - The string to interpret.
185
- * @param givenOptions - Expression options.
186
- * @param givenOptions.scope - Scope to extract names from.
187
- * @param givenOptions.execute - Indicates whether to execute or evaluate.
188
- * @param givenOptions.removeGlobalScope - Indicates whether to shadow global
189
- * scope.
190
- * @param givenOptions.binding - Object to apply as "this" in evaluation scope.
191
- * @param givenOptions.async - Indicates whether to compile an async function.
192
- * @returns Object with an error message during parsing / running or result.
193
- */
194
- export declare const evaluate: <T = string, S extends object = object>(expression: string, givenOptions?: Partial<EvaluateExpressionOptions<S>>) => EvaluationResult<T>;
195
- /**
196
- * Evaluates a given string as an expression against a given scope. Does same
197
- * as "evaluate" but throws an exception if an error occurs and returns the
198
- * evaluated value instead of an object with error and result.
199
- * @param expression - The string to interpret.
200
- * @param options - Expression options.
201
- * @param options.scope - Scope to extract names from.
202
- * @param options.execute - Indicates whether to execute or evaluate.
203
- * @param options.removeGlobalScope - Indicates whether to shadow global scope.
204
- * @param options.binding - Object to apply as "this" in evaluation scope.
205
- * @param options.async - Indicates whether to compile an async function.
206
- * @returns Object with an error message during parsing / running or result.
207
- */
208
- export declare const evaluateOrThrowError: <Result = string, Scope extends object = object>(expression: string, options?: Partial<EvaluateExpressionOptions<Scope>>) => Result;
209
- /**
210
- * Finds the string match of a given query in a given target text by applying a
211
- * given normalization function to target and query.
212
- * @param target - Target to search in.
213
- * @param query - Search string to search for.
214
- * @param normalizer - Function to use as normalization for queries and search
215
- * targets.
216
- * @param skipTagDelimitedParts - Indicates whether to, for example, ignore
217
- * html tags via "['<', '>']" (the default).
218
- * @returns Start and end index of matching range.
219
- */
220
- export declare const findNormalizedMatchRange: (target: unknown, query: unknown, normalizer?: (value: unknown) => string, skipTagDelimitedParts?: null | [string, string]) => Array<number> | null;
221
- /**
222
- * Fixes known encoding problems in given data.
223
- * @param data - To process.
224
- * @returns Processed data.
225
- */
226
- export declare const fixKnownEncodingErrors: (data: string) => string;
227
- /**
228
- * Performs a string formation. Replaces every placeholder "{i}" with the i'th
229
- * argument.
230
- * @param string - The string to format.
231
- * @param additionalArguments - Additional arguments are interpreted as
232
- * replacements for string formatting.
233
- * @returns The formatted string.
234
- */
235
- export declare const format: (string: string, ...additionalArguments: Array<unknown>) => string;
236
- /**
237
- * Calculates the edit (levenstein) distance between two given strings.
238
- * @param first - First string to compare.
239
- * @param second - Second string to compare.
240
- * @returns The distance as number.
241
- */
242
- export declare const getEditDistance: (first: string, second: string) => number;
243
- /**
244
- * Validates the current string for using in a regular expression pattern.
245
- * Special regular expression chars will be escaped.
246
- * @param value - The string to format.
247
- * @returns The formatted string.
248
- */
249
- export declare const maskForRegularExpression: (value: string) => string;
250
- /**
251
- * Converts a string to its lower case representation.
252
- * @param string - The string to format.
253
- * @returns The formatted string.
254
- */
255
- export declare const lowerCase: (string: string) => string;
256
- /**
257
- * Wraps given mark strings in a given target with a given marker.
258
- * @param target - String to search for marker.
259
- * @param givenWords - String or array of strings to search in target for.
260
- * @param givenOptions - Defines highlighting behavior.
261
- * @param givenOptions.marker - HTML template string to mark.
262
- * @param givenOptions.normalizer - Pure normalization function to use before
263
- * searching for matches.
264
- * @param givenOptions.skipTagDelimitedParts - Indicates whether to, for
265
- * example, ignore html tags via "['<', '>']" (the default).
266
- * @returns Processed result.
267
- */
268
- export declare const mark: (target: unknown, givenWords?: Array<string> | string, givenOptions?: Partial<StringMarkOptions>) => unknown;
269
- /**
270
- * Normalizes a given phone number for automatic dialing or comparison.
271
- * @param value - Number to normalize.
272
- * @param dialable - Indicates whether the result should be dialed or
273
- * represented as lossless data.
274
- * @returns Normalized number.
275
- */
276
- export declare const normalizePhoneNumber: (value: unknown, dialable?: boolean) => string;
277
- /**
278
- * Normalizes a given zip code for automatic address processing.
279
- * @param value - Number to normalize.
280
- * @returns Normalized number.
281
- */
282
- export declare const normalizeZipCode: (value: unknown) => string;
283
- /**
284
- * Converts a given serialized, base64 encoded or file path given object into a
285
- * native JavaScript one if possible.
286
- * @param serializedObject - Object as string.
287
- * @param scope - An optional scope which will be used to evaluate given object
288
- * in.
289
- * @param name - The name under given scope will be available.
290
- * @returns The parsed object if possible and null otherwise.
291
- */
292
- export declare const parseEncodedObject: <T = PlainObject>(serializedObject: string, scope?: Mapping<unknown>, name?: string) => null | T;
293
- /**
294
- * Represents a given phone number. NOTE: Currently only support German phone
295
- * numbers.
296
- * @param value - Number to format.
297
- * @returns Formatted number.
298
- */
299
- export declare const representPhoneNumber: (value: unknown) => string;
300
- /**
301
- * Slices all none numbers but preserves last separator.
302
- * @param value - String to process.
303
- * @returns - Sliced given value.
304
- */
305
- export declare const sliceAllExceptNumberAndLastSeparator: (value: string) => string;
306
- /**
307
- * Converts a dom selector to a prefixed dom selector string.
308
- * @param selector - A dom node selector.
309
- * @param selectorPrefix - A dom node selector prefix to take into account.
310
- * @returns Returns given selector prefixed.
311
- */
312
- export declare const normalizeDomNodeSelector: (selector: string, selectorPrefix?: string) => string;
313
- /**
314
- * Abbreviates a given string if it excesses a given limit.
315
- * @param value - String to abbreviate.
316
- * @param limit - Maximum length of processed string.
317
- * @returns Abbreviated given string.
318
- */
319
- export declare const limit: (value: string, limit?: number) => string;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1,245 +0,0 @@
1
- import { AnyFunction, FirstParameter, FunctionTestTuple, FunctionTestPromiseTuple, FunctionTestPromiseRejectionTuple, TestMatchers as Matchers, TestSymbol, ThenParameter, UnknownFunction, FunctionTestAgainstResolvedPromiseTuple, FunctionTestPromiseAgainstResolvedPromiseTuple, FunctionTestPromiseRejectionAgainstResolvedPromiseTuple } from './type';
2
- export declare const TEST_DEFINED_SYMBOL: unique symbol;
3
- export declare const TEST_THROW_SYMBOL: unique symbol;
4
- export declare const TEST_UNDEFINED_SYMBOL: unique symbol;
5
- /**
6
- * Tests given result against given expectations. Respects special symbol
7
- * values.
8
- * @param givenResult - Target to compare expectation against.
9
- * @param expected - Expected result.
10
- * @param wrap - Indicates whether to wrap with an expect function call.
11
- * @returns Nothing or a promise resolving to nothing.
12
- */
13
- export declare const expectExpectedType: <Type = unknown, Result extends Promise<void> | void = void>(givenResult: Matchers<Result> | Result, expected: TestSymbol | Type, wrap?: boolean) => Result;
14
- /**
15
- * Tests each given test set (expected value follows by various list of
16
- * function parameters). It respects function signature to raise compile time
17
- * errors if given test set does not match given function signature.
18
- * @param functionName - Function description to test.
19
- * @param callback - Function reference to test.
20
- * @param functionTestTuple - Additional arrays of test sets to test given
21
- * function again.
22
- */
23
- export declare const testEach: {
24
- <FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestTuple<FunctionType>>): void;
25
- only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestTuple<FunctionType>>): void;
26
- skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestTuple<FunctionType>>): void;
27
- };
28
- /**
29
- * Tests each given test set (promise resolving to expected value follows by
30
- * various list of function parameters). It respects function signature to
31
- * raise compile time errors if given test set does not match given function
32
- * signature.
33
- * @param functionName - Function description to test.
34
- * @param callback - Function reference to test.
35
- * @param functionTestTuple - Additional arrays of test sets to test given
36
- * function again.
37
- */
38
- export declare const testEachAgainstResolvedPromise: {
39
- <FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestAgainstResolvedPromiseTuple<FunctionType>>): void;
40
- only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestAgainstResolvedPromiseTuple<FunctionType>>): void;
41
- skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestAgainstResolvedPromiseTuple<FunctionType>>): void;
42
- };
43
- /**
44
- * Tests each given test set (expected value follows by various list of
45
- * function parameters). It respects function signature to raise compile time
46
- * errors if given test set does not match given function signature.
47
- * @param functionName - Function description to test.
48
- * @param callback - Function reference to test.
49
- * @param functionTestTuple - Additional arrays of test sets to test given
50
- * function again.
51
- */
52
- export declare const testEachResolvedPromise: {
53
- <FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseTuple<FunctionType>>): void;
54
- only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseTuple<FunctionType>>): void;
55
- skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseTuple<FunctionType>>): void;
56
- };
57
- /**
58
- * Tests each given test set (expected value follows by various list of
59
- * function parameters). It respects function signature to raise compile time
60
- * errors if given test set does not match given function signature.
61
- * @param functionName - Function description to test.
62
- * @param callback - Function reference to test.
63
- * @param functionTestTuple - Additional arrays of test sets to test given
64
- * function again.
65
- */
66
- export declare const testEachResolvedPromiseAgainstResolvedPromise: <FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseAgainstResolvedPromiseTuple<FunctionType>>) => void;
67
- /**
68
- * Tests each given test set (expected value follows by various list of
69
- * function parameters). It respects function signature to raise compile time
70
- * errors if given test set does not match given function signature.
71
- * @param functionName - Function description to test.
72
- * @param callback - Function reference to test.
73
- * @param functionTestTuple - Additional arrays of test sets to test given
74
- * function again.
75
- */
76
- export declare const testEachRejectedPromise: {
77
- <FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseRejectionTuple<FunctionType>>): void;
78
- only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseRejectionTuple<FunctionType>>): void;
79
- skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseRejectionTuple<FunctionType>>): void;
80
- };
81
- /**
82
- * Tests each given test set (expected value follows by various list of
83
- * function parameters). It respects function signature to raise compile time
84
- * errors if given test set does not match given function signature.
85
- * @param functionName - Function description to test.
86
- * @param callback - Function reference to test.
87
- * @param functionTestTuple - Additional arrays of test sets to test given
88
- * function again.
89
- */
90
- export declare const testEachRejectedPromiseAgainstResolvedPromise: {
91
- <FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseRejectionAgainstResolvedPromiseTuple<FunctionType>>): void;
92
- only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseRejectionAgainstResolvedPromiseTuple<FunctionType>>): void;
93
- skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseRejectionAgainstResolvedPromiseTuple<FunctionType>>): void;
94
- };
95
- /**
96
- * Tests each given single parameter against same given expected value. It
97
- * respects function signature to raise compile time errors if given test set
98
- * does not match given function signature.
99
- * @param functionName - Function description to test.
100
- * @param callback - Function reference to test.
101
- * @param expected - Value to check each function call return value against.
102
- * @param parameters - Additional first parameters to test given function with.
103
- */
104
- export declare const testEachSingleParameterAgainstSameExpectation: {
105
- <FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: ReturnType<FunctionType> | TestSymbol, ...parameters: Array<FirstParameter<FunctionType>>): void;
106
- only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: ReturnType<FunctionType> | TestSymbol, ...parameters: Array<FirstParameter<FunctionType>>): void;
107
- skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: ReturnType<FunctionType> | TestSymbol, ...parameters: Array<FirstParameter<FunctionType>>): void;
108
- };
109
- /**
110
- * Tests each given single parameter against same given expected value. It
111
- * respects function signature to raise compile time errors if given test set
112
- * does not match given function signature.
113
- * @param functionName - Function description to test.
114
- * @param callback - Function reference to test.
115
- * @param expected - Value to check each function call return value against.
116
- * @param parameters - Additional first parameters to test given function with.
117
- */
118
- export declare const testEachResolvedPromiseWithSingleParameterAgainstSameExpectation: {
119
- <FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: TestSymbol | ThenParameter<ReturnType<FunctionType>>, ...parameters: Array<FirstParameter<FunctionType>>): void;
120
- only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: TestSymbol | ThenParameter<ReturnType<FunctionType>>, ...parameters: Array<FirstParameter<FunctionType>>): void;
121
- skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: TestSymbol | ThenParameter<ReturnType<FunctionType>>, ...parameters: Array<FirstParameter<FunctionType>>): void;
122
- };
123
- /**
124
- * Tests each given single parameter against same given promises resolving to
125
- * expected value. It respects function signature to raise compile time errors
126
- * if given test set does not match given function signature.
127
- * @param functionName - Function description to test.
128
- * @param callback - Function reference to test.
129
- * @param expected - Promise resolving to value to check each function call
130
- * return value against.
131
- * @param parameters - Additional first parameters to test given function with.
132
- */
133
- export declare const testEachResolvedPromiseWithSingleParameterAgainstSameResolvedPromise: {
134
- <FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<TestSymbol | ThenParameter<ReturnType<FunctionType>>>, ...parameters: Array<FirstParameter<FunctionType>>): void;
135
- only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<TestSymbol | ThenParameter<ReturnType<FunctionType>>>, ...parameters: Array<FirstParameter<FunctionType>>): void;
136
- skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<TestSymbol | ThenParameter<ReturnType<FunctionType>>>, ...parameters: Array<FirstParameter<FunctionType>>): void;
137
- };
138
- /**
139
- * Tests each given single parameter against same given expected value. It
140
- * respects function signature to raise compile time errors if given test set
141
- * does not match given function signature.
142
- * @param functionName - Function description to test.
143
- * @param callback - Function reference to test.
144
- * @param expected - Value to check each function call return value against.
145
- * @param parameters - Additional first parameters to test given function with.
146
- */
147
- export declare const testEachRejectedPromiseWithSingleParameterAgainstSameExpectation: {
148
- <FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Error | TestSymbol, ...parameters: Array<FirstParameter<FunctionType>>): void;
149
- only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Error | TestSymbol, ...parameters: Array<FirstParameter<FunctionType>>): void;
150
- skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Error | TestSymbol, ...parameters: Array<FirstParameter<FunctionType>>): void;
151
- };
152
- /**
153
- * Tests each given single parameter against same given expected value. It
154
- * respects function signature to raise compile time errors if given test set
155
- * does not match given function signature.
156
- * @param functionName - Function description to test.
157
- * @param callback - Function reference to test.
158
- * @param expected - Value to check each function call return value against.
159
- * @param parameters - Additional first parameters to test given function with.
160
- */
161
- export declare const testEachRejectedPromiseWithSingleParameterAgainstSameResolvedPromise: {
162
- <FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<Error | TestSymbol>, ...parameters: Array<FirstParameter<FunctionType>>): void;
163
- only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<Error | TestSymbol>, ...parameters: Array<FirstParameter<FunctionType>>): void;
164
- skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<Error | TestSymbol>, ...parameters: Array<FirstParameter<FunctionType>>): void;
165
- };
166
- /**
167
- * Tests each given test set (various list of function parameters) against same
168
- * given expected value. It respects function signature to raise compile time
169
- * errors if given test set does not match given function signature.
170
- * @param functionName - Function description to test.
171
- * @param callback - Function reference to test.
172
- * @param expected - Value to check each function call return value against.
173
- * @param functionParameters - Additional lists of parameters to test given
174
- * function again.
175
- */
176
- export declare const testEachAgainstSameExpectation: {
177
- <FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: ReturnType<FunctionType> | TestSymbol, ...functionParameters: Array<Parameters<FunctionType>>): void;
178
- only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: ReturnType<FunctionType> | TestSymbol, ...functionParameters: Array<Parameters<FunctionType>>): void;
179
- skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: ReturnType<FunctionType> | TestSymbol, ...functionParameters: Array<Parameters<FunctionType>>): void;
180
- };
181
- /**
182
- * Tests each given test set (various list of function parameters) against same
183
- * given expected value. It respects function signature to raise compile time
184
- * errors if given test set does not match given function signature.
185
- * @param functionName - Function description to test.
186
- * @param callback - Function reference to test.
187
- * @param expected - Value to check each function call return value against.
188
- * @param functionParameters - Additional lists of parameters to test given
189
- * function again.
190
- */
191
- export declare const testEachResolvedPromiseAgainstSameExpectation: {
192
- <FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: TestSymbol | ThenParameter<ReturnType<FunctionType>>, ...functionParameters: Array<Parameters<FunctionType>>): void;
193
- only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: TestSymbol | ThenParameter<ReturnType<FunctionType>>, ...functionParameters: Array<Parameters<FunctionType>>): void;
194
- skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: TestSymbol | ThenParameter<ReturnType<FunctionType>>, ...functionParameters: Array<Parameters<FunctionType>>): void;
195
- };
196
- /**
197
- * Tests each given test set (various list of function parameters) against same
198
- * given promise resolving expected value. It respects function signature to
199
- * raise compile time errors if given test set does not match given function
200
- * signature.
201
- * @param functionName - Function description to test.
202
- * @param callback - Function reference to test.
203
- * @param expected - Promise resolving to value to check each function call
204
- * return value against.
205
- * @param functionParameters - Additional lists of parameters to test given
206
- * function again.
207
- */
208
- export declare const testEachResolvedPromiseAgainstSameResolvedPromise: {
209
- <FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<TestSymbol | ThenParameter<ReturnType<FunctionType>>>, ...functionParameters: Array<Parameters<FunctionType>>): void;
210
- only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<TestSymbol | ThenParameter<ReturnType<FunctionType>>>, ...functionParameters: Array<Parameters<FunctionType>>): void;
211
- skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<TestSymbol | ThenParameter<ReturnType<FunctionType>>>, ...functionParameters: Array<Parameters<FunctionType>>): void;
212
- };
213
- /**
214
- * Tests each given test set (various list of function parameters) against same
215
- * given expected value. It respects function signature to raise compile time
216
- * errors if given test set does not match given function signature.
217
- * @param functionName - Function description to test.
218
- * @param callback - Function reference to test.
219
- * @param expected - Value to check each function call return value against.
220
- * @param functionParameters - Additional lists of parameters to test given
221
- * function again.
222
- */
223
- export declare const testEachRejectedPromiseAgainstSameExpectation: {
224
- <FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Error | TestSymbol, ...functionParameters: Array<Parameters<FunctionType>>): void;
225
- only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Error | TestSymbol, ...functionParameters: Array<Parameters<FunctionType>>): void;
226
- skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Error | TestSymbol, ...functionParameters: Array<Parameters<FunctionType>>): void;
227
- };
228
- /**
229
- * Tests each given test set (various list of function parameters) against same
230
- * given promise resolving expected value. It respects function signature to
231
- * raise compile time errors if given test set does not match given function
232
- * signature.
233
- * @param functionName - Function description to test.
234
- * @param callback - Function reference to test.
235
- * @param expected - Promise resolving to value to check each function call
236
- * return value against.
237
- * @param functionParameters - Additional lists of parameters to test given
238
- * function again.
239
- */
240
- export declare const testEachRejectedPromiseAgainstSameResolvedPromise: {
241
- <FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<Error | TestSymbol>, ...functionParameters: Array<Parameters<FunctionType>>): void;
242
- only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<Error | TestSymbol>, ...functionParameters: Array<Parameters<FunctionType>>): void;
243
- skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<Error | TestSymbol>, ...functionParameters: Array<Parameters<FunctionType>>): void;
244
- };
245
- export default testEach;