@types/test-console
TypeScript icon, indicating that this package has built-in type declarations

2.0.3 • Public • Published

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

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

export type Output = readonly 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: Mon, 20 Nov 2023 23:36:24 GMT
  • Dependencies: none

Credits

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

Readme

Keywords

none

Package Sidebar

Install

npm i @types/test-console

Weekly Downloads

1,721

Version

2.0.3

License

MIT

Unpacked Size

5.18 kB

Total Files

5

Last publish

Collaborators

  • types