UNPKG

1.18 kBTypeScriptView Raw
1import { KnownKeys } from '@stryker-mutator/util';
2import { WarningOptions } from '@stryker-mutator/api/core';
3export declare const objectUtils: {
4 /**
5 * Calls a defined callback function on each element of a map, and returns an array that contains the results.
6 *
7 * @param subject The map to act on
8 * @param callbackFn The callback fn
9 * @returns
10 */
11 map<K, V, R>(subject: Map<K, V>, callbackFn: (value: V, key: K) => R): R[];
12 /**
13 * A wrapper around `process.env` (for testability)
14 */
15 getEnvironmentVariable(nameEnvironmentVariable: string): string | undefined;
16 undefinedEmptyString(str: string | undefined): string | undefined;
17 getEnvironmentVariableOrThrow(name: string): string;
18 isWarningEnabled(warningType: KnownKeys<WarningOptions>, warningOptions: WarningOptions | boolean): boolean;
19 /**
20 * A wrapper around `process.exitCode = n` (for testability)
21 */
22 setExitCode(n: number): void;
23 kill(pid: number | undefined): Promise<void>;
24 /**
25 * Creates a random integer number.
26 * @returns A random integer.
27 */
28 random(): number;
29};
30//# sourceMappingURL=object-utils.d.ts.map
\No newline at end of file