clientnode 4.0.1440 → 4.0.1442

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