npm.io
1.0.4 • Published 2 years ago

@types/std-mocks

Licence
MIT
Version
1.0.4
Deps
0
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/std-mocks

Summary

This package contains type definitions for std-mocks (https://github.com/neoziro/std-mocks#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/std-mocks.

index.d.ts

export interface Options {
    stdout?: boolean | undefined;
    stderr?: boolean | undefined;
}

/**
 * Start mocking std output
 */
export function use(opts?: Options & { print?: boolean | undefined }): void;

/**
 * Restore std output
 */
export function restore(opts?: Options): void;

/**
 * Flush collected output
 */
export function flush(opts: Options & { stdout: false; stderr: false }): {};
export function flush(opts: Options & { stderr: false }): { stdout: string[] };
export function flush(opts: Options & { stdout: false }): { stderr: string[] };
export function flush(opts?: Options): { stdout: string[]; stderr: string[] };

Additional Details

  • Last updated: Tue, 07 Nov 2023 1536 GMT
  • Dependencies: none

Credits

These definitions were written by Jeff Dickey.