2.0.3 • Published 6 months ago

@types/test-console v2.0.3

Weekly downloads
796
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/test-console

Summary

This package contains type definitions for test-console (https://github.com/jamesshore/test-console).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/test-console.

index.d.ts

// Type definitions for test-console 2.0
// Project: https://github.com/jamesshore/test-console
// Definitions by:  Roberto Soares <https://github.com/roberto>
//                  Pedro Guidoux <https://github.com/guidoux>
//                  Guilherme Moretti <https://github.com/gbmoretti>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

export const stdout: TestStream;
export const stderr: TestStream;

export type Output = ReadonlyArray<string>;
export type OutputCallback = (output: Output) => void;
export type AsyncOutputCallback = (output: Output) => Promise<void>;
export type NoOutputCallback = () => void;
export type AsyncNoOutputCallback = () => Promise<void>;
export type Restore = () => void;

export interface Options {
    isTTY?: boolean | undefined;
}

export interface Inspector {
    output: Output;
    restore: Restore;
}

export interface TestStream {
    inspect(options?: Options): Inspector;
    inspectSync(fn: OutputCallback): Output;
    inspectSync(options: Options, fn: OutputCallback): Output;
    inspectAsync(fn: AsyncOutputCallback): Promise<Output>;
    inspectAsync(options: Options, fn: AsyncOutputCallback): Promise<Output>;
    ignore(options?: Options): Restore;
    ignoreSync(fn: NoOutputCallback): void;
    ignoreSync(options: Options, fn: NoOutputCallback): void;
    ignoreAsync(fn: AsyncNoOutputCallback): Promise<void>;
    ignoreAsync(options: Options, fn: AsyncNoOutputCallback): Promise<void>;
}

Additional Details

  • Last updated: Sat, 08 Jan 2022 17:01:23 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Roberto Soares, Pedro Guidoux, and Guilherme Moretti.

2.0.3

6 months ago

2.0.2

6 months ago

2.0.1

7 months ago

2.0.0

2 years ago

1.1.1

3 years ago

1.1.0

6 years ago