<commit_before>// Type definitions for child-process-promise 2.2
// Project: https://github.com/patrick-steele-idem/child-process-promise
// Definitions by: <NAME> <https://github.com/TheDSCPL>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.0

/// <reference types="node" />

import {
    ChildProcess,
    ExecFileOptionsWithBufferEncoding, ExecFileOptionsWithOtherEncoding,
    ExecFileOptionsWithStringEncoding,
    ExecOptions,
    ForkOptions,
    SpawnOptions
} from 'child_process';

/**
 * Simple wrapper around the child_process module that makes use of promises
 */

export interface PromiseResult<Enc extends string|Buffer> {
    childProcess: ChildProcess;
    stdout: Enc;
    stderr: Enc;
}

export interface SpawnPromiseResult extends PromiseResult<string> {
    code: number;
}

export interface ChildProcessPromise<T> extends Promise<T> {
    childProcess: ChildProcess;
}

export interface Options {
    /**
     * Pass an additional capture option to buffer the result of stdout and/or stderr
     * Default: []
     */
    capture?: []|['stdout'|'stderr']|['stdout','stderr']|['stderr','stdout'];
    /**<commit_msg>Added missing white spaces as asked by<commit_after>// Type definitions for child-process-promise 2.2
// Project: https://github.com/patrick-steele-idem/child-process-promise
// Definitions by: <NAME> <https://github.com/TheDSCPL>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.0

/// <reference types="node" />

import {
    ChildProcess,
    ExecFileOptionsWithBufferEncoding, ExecFileOptionsWithOtherEncoding,
    ExecFileOptionsWithStringEncoding,
    ExecOptions,
    ForkOptions,
    SpawnOptions
} from 'child_process';

/**
 * Simple wrapper around the child_process module that makes use of promises
 */

export interface PromiseResult<Enc extends string|Buffer> {
    childProcess: ChildProcess;
    stdout: Enc;
    stderr: Enc;
}

export interface SpawnPromiseResult extends PromiseResult<string> {
    code: number;
}

export interface ChildProcessPromise<T> extends Promise<T> {
    childProcess: ChildProcess;
}

export interface Options {
    /**
     * Pass an additional capture option to buffer the result of stdout and/or stderr
     * Default: []
     */
    capture?: []|['stdout'|'stderr']|['stdout', 'stderr']|['stderr', 'stdout'];
    /**
{'fraction_non_alphanumeric': 0.11804102134784429, 'fraction_numerical': 0.0033486814566764337, 'mean_word_length': 4.117773019271948, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6330479', 'n_tokens_mistral': 691, 'n_tokens_neox': 678, 'n_words': 176}